arch: arm: Always define ARCH stack definitions
This patch always defines the ARCH_THREAD_STACK_XXX macros/functions regardless of the MPU_STACK_GUARD usage. Only use MPU_STACK_GUARD when determining the minimum stack alignment. Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
parent
6e2ba2c9e1
commit
6962ae8f4c
1 changed files with 3 additions and 6 deletions
|
@ -43,8 +43,10 @@ extern "C" {
|
||||||
#include <arch/arm/cortex_m/nmi.h>
|
#include <arch/arm/cortex_m/nmi.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_MPU_STACK_GUARD)
|
#if defined(CONFIG_MPU_STACK_GUARD)
|
||||||
|
|
||||||
#define STACK_ALIGN 32
|
#define STACK_ALIGN 32
|
||||||
|
#else /* CONFIG_MPU_STACK_GUARD */
|
||||||
|
#define STACK_ALIGN 4
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Declare a toplevel thread stack memory region
|
* @brief Declare a toplevel thread stack memory region
|
||||||
|
@ -128,11 +130,6 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define _ARCH_THREAD_STACK_BUFFER(sym) (sym + STACK_ALIGN)
|
#define _ARCH_THREAD_STACK_BUFFER(sym) (sym + STACK_ALIGN)
|
||||||
|
|
||||||
#else /* CONFIG_MPU_STACK_GUARD */
|
|
||||||
|
|
||||||
#define STACK_ALIGN 4
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue