Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.5-branch] linker: allow tagging variables with __nocache_noinit and update Bosch M_CAN driver to use it #65277

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/zephyr/drivers/can/can_mcan.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ enum can_mcan_psr_lec {
*/
#define CAN_MCAN_DT_MRAM_DEFINE(node_id, _name) \
BUILD_ASSERT(CAN_MCAN_DT_MRAM_OFFSET(node_id) == 0, "offset must be 0"); \
static char __noinit __nocache __aligned(4) _name[CAN_MCAN_DT_MRAM_ELEMENTS_SIZE(node_id)];
static char __nocache_noinit __aligned(4) _name[CAN_MCAN_DT_MRAM_ELEMENTS_SIZE(node_id)];

/**
* @brief Assert that the Message RAM configuration meets the Bosch M_CAN IP core restrictions
Expand Down
2 changes: 2 additions & 0 deletions include/zephyr/linker/section_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@

#if defined(CONFIG_NOCACHE_MEMORY)
#define __nocache __in_section_unique(_NOCACHE_SECTION_NAME)
#define __nocache_noinit __nocache
#else
#define __nocache
#define __nocache_noinit __noinit
#endif /* CONFIG_NOCACHE_MEMORY */

#if defined(CONFIG_KERNEL_COHERENCE)
Expand Down