kernel: remove STACK_ALIGN checks

STACK_ALIGN has somewhat different semantics across our arches,
particularly ARC.

These checks are unnecessary, _new_thread() is required
to properly align stack sizes anyway.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2018-05-23 11:42:42 -07:00 committed by Kumar Gala
parent 14fe2727b8
commit 4afc6c9ff2
2 changed files with 0 additions and 16 deletions

View file

@ -68,15 +68,6 @@ u64_t __noinit __idle_time_stamp; /* timestamp when CPU goes idle */
/* init/main and idle threads */ /* init/main and idle threads */
#define IDLE_STACK_SIZE CONFIG_IDLE_STACK_SIZE #define IDLE_STACK_SIZE CONFIG_IDLE_STACK_SIZE
#if CONFIG_MAIN_STACK_SIZE & (STACK_ALIGN - 1)
#error "MAIN_STACK_SIZE must be a multiple of the stack alignment"
#endif
#if IDLE_STACK_SIZE & (STACK_ALIGN - 1)
#error "IDLE_STACK_SIZE must be a multiple of the stack alignment"
#endif
#define MAIN_STACK_SIZE CONFIG_MAIN_STACK_SIZE #define MAIN_STACK_SIZE CONFIG_MAIN_STACK_SIZE
K_THREAD_STACK_DEFINE(_main_stack, MAIN_STACK_SIZE); K_THREAD_STACK_DEFINE(_main_stack, MAIN_STACK_SIZE);
@ -96,9 +87,6 @@ k_tid_t const _idle_thread = (k_tid_t)&_idle_thread_s;
* of this area is safe since interrupts are disabled until the kernel context * of this area is safe since interrupts are disabled until the kernel context
* switches to the init thread. * switches to the init thread.
*/ */
#if CONFIG_ISR_STACK_SIZE & (STACK_ALIGN - 1)
#error "ISR_STACK_SIZE must be a multiple of the stack alignment"
#endif
K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE); K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);
/* /*

View file

@ -148,10 +148,6 @@ out:
#define FAIL_FAST 0 #define FAIL_FAST 0
#endif #endif
#if CONFIG_ZTEST_STACKSIZE & (STACK_ALIGN - 1)
#error "CONFIG_ZTEST_STACKSIZE must be a multiple of the stack alignment"
#endif
K_THREAD_STACK_DEFINE(ztest_thread_stack, CONFIG_ZTEST_STACKSIZE + K_THREAD_STACK_DEFINE(ztest_thread_stack, CONFIG_ZTEST_STACKSIZE +
CONFIG_TEST_EXTRA_STACKSIZE); CONFIG_TEST_EXTRA_STACKSIZE);