Skip to content

arch: arm: minor clean-up in interrupt stack size derivation #16355

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

Merged
Merged
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
10 changes: 2 additions & 8 deletions arch/arm/include/cortex_m/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,8 @@ extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);
*/
static ALWAYS_INLINE void z_InterruptStackSetup(void)
{
#if defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
defined(CONFIG_USERSPACE)
u32_t msp = (u32_t)(Z_THREAD_STACK_BUFFER(_interrupt_stack) +
CONFIG_ISR_STACK_SIZE - MPU_GUARD_ALIGN_AND_SIZE);
#else
u32_t msp = (u32_t)(Z_THREAD_STACK_BUFFER(_interrupt_stack) +
CONFIG_ISR_STACK_SIZE);
#endif
u32_t msp = (u32_t)(Z_THREAD_STACK_BUFFER(_interrupt_stack)) +
K_THREAD_STACK_SIZEOF(_interrupt_stack);

__set_MSP(msp);
#if defined(CONFIG_BUILTIN_STACK_GUARD)
Expand Down