kernel/include: Put kernel stack memory in the right memory

The CONFIG_KERNEL_COHERENCE framework merged with a typo that left its
validation asserts disabled.  But it was written before the "kernel
stacks" feature merged, and so missed the K_KERNEL_STACK_* macros,
which need to put their stacks into __stackmem and not merely
__noinit.

Turning the asserts on exposed the bug.

Fixes #32112

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2021-02-09 11:43:20 -08:00 committed by Anas Nashif
commit 38195d5dd1
2 changed files with 6 additions and 4 deletions

View file

@ -44,9 +44,11 @@
#if defined(CONFIG_KERNEL_COHERENCE)
#define __incoherent __in_section_unique(cached)
#define __stackmem __incoherent
#define __kstackmem __stackmem
#else
#define __incoherent Z_GENERIC_SECTION(.user_stacks)
#define __stackmem __incoherent
#define __incoherent
#define __stackmem Z_GENERIC_SECTION(.user_stacks)
#define __kstackmem __noinit
#endif /* CONFIG_KERNEL_COHERENCE */
#endif /* !_ASMLANGUAGE */