Remove not needed stack growth direction defines

All supported platforms have descending stack (growth direction is
down). To avoid confusion just remove not needed stack direction
defines.

If new platform with stack direction up is added is should be
configured by adding Kconfig option eg STACK_GROWS_UP and
CONFIG_STACK_GROWS_UP should be used in code that depends on
stack growth direction.

Change-Id: I786ff1ab28d8f8bad3f6d1bbe64defc0e81d1707
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2015-09-29 17:27:47 +02:00 committed by Anas Nashif
commit 83e0faf19f
4 changed files with 0 additions and 24 deletions

View file

@ -157,8 +157,6 @@ typedef struct firq_regs tFirqRegs;
/* stacks */
#define STACK_GROWS_DOWN 0
#define STACK_GROWS_UP 1
#define STACK_ALIGN_SIZE 4
#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN_SIZE)

View file

@ -75,15 +75,6 @@ config STACK_ALIGN_DOUBLE_WORD
This is needed to conform to AAPCS, the procedure call standard for
the ARM. It wastes stack space.
config STACK_GROWS_DOWN
bool
prompt "Stacks grow down"
default y
help
Stacks can grow either up or down. Down is the default. Don't change
this unless you have a very good reason to do so.
config NUM_IRQ_PRIO_BITS
int
#hidden option, implemented by platform

View file

@ -41,12 +41,6 @@ Stack helper functions.
#include <nano_private.h>
#include <asm_inline.h>
#ifdef CONFIG_STACK_GROWS_DOWN
#define STACK_DIR STACK_GROWS_DOWN
#else
#define STACK_DIR STACK_GROWS_UP
#endif
#ifdef CONFIG_STACK_ALIGN_DOUBLE_WORD
#define STACK_ALIGN_SIZE 8
#else
@ -59,12 +53,8 @@ Stack helper functions.
#else
#if (STACK_DIR == STACK_GROWS_DOWN)
#define __GET_MSP() \
STACK_ROUND_DOWN(&_interrupt_stack[CONFIG_ISR_STACK_SIZE - 1])
#else
#define __GET_MSP() STACK_ROUND_UP(&_interrupt_stack[0])
#endif
extern char _interrupt_stack[CONFIG_ISR_STACK_SIZE];

View file

@ -114,9 +114,6 @@ typedef struct preempt tPreempt;
/* stacks */
#define STACK_GROWS_DOWN 0
#define STACK_GROWS_UP 1
#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN_SIZE)
#define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN_SIZE)