Skip to content

Commit c22c4fd

Browse files
Flavio Ceolinnashif
authored andcommitted
linker: Fix __stackmem section with CONFIG_KERNEL_COHERENCE
When building whith CONFIG_KERNEL_COHERENCE enabled, __stackmem was not being put in the user_stack section making impossible to gen_kobject script find user capable stacks. It is responsability of the platform to put user_stacks section in the appropriated region. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent d4e11a1 commit c22c4fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/zephyr/linker/section_tags.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@
5151

5252
#if defined(CONFIG_KERNEL_COHERENCE)
5353
#define __incoherent __in_section_unique(cached)
54+
#if defined(CONFIG_USERSPACE)
55+
#define __stackmem Z_GENERIC_SECTION(.user_stacks)
56+
#else
5457
#define __stackmem __incoherent
55-
#define __kstackmem __stackmem
58+
#endif /* CONFIG_USERSPACE */
59+
#define __kstackmem __incoherent
5660
#else
5761
#define __incoherent
5862
#define __stackmem Z_GENERIC_SECTION(.user_stacks)

0 commit comments

Comments
 (0)