Skip to content

Commit

Permalink
linker: Fix __stackmem section with CONFIG_KERNEL_COHERENCE
Browse files Browse the repository at this point in the history
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 <flavio.ceolin@intel.com>
  • Loading branch information
Flavio Ceolin authored and nashif committed May 27, 2023
1 parent d4e11a1 commit c22c4fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/zephyr/linker/section_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@

#if defined(CONFIG_KERNEL_COHERENCE)
#define __incoherent __in_section_unique(cached)
#if defined(CONFIG_USERSPACE)
#define __stackmem Z_GENERIC_SECTION(.user_stacks)
#else
#define __stackmem __incoherent
#define __kstackmem __stackmem
#endif /* CONFIG_USERSPACE */
#define __kstackmem __incoherent
#else
#define __incoherent
#define __stackmem Z_GENERIC_SECTION(.user_stacks)
Expand Down

0 comments on commit c22c4fd

Please sign in to comment.