mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 01:38:36 +08:00
risc-v/k210: Fix SMP interrupt stack size calculation
manual cherry-pick from #3636 Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
parent
680225923d
commit
3130ff691e
1 changed files with 6 additions and 1 deletions
|
@ -81,7 +81,12 @@ void up_irqinitialize(void)
|
||||||
/* Colorize the interrupt stack for debug purposes */
|
/* Colorize the interrupt stack for debug purposes */
|
||||||
|
|
||||||
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 15
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 15
|
||||||
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~15);
|
size_t intstack_size = 0;
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
|
intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~15);
|
||||||
|
#else
|
||||||
|
intstack_size = ((CONFIG_ARCH_INTERRUPTSTACK * CONFIG_SMP_NCPUS) & ~15);
|
||||||
|
#endif
|
||||||
riscv_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
riscv_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
||||||
intstack_size);
|
intstack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue