risc-v/k210: Fix SMP interrupt stack size calculation

This commit is contained in:
Gustavo Henrique Nihei 2021-04-29 14:51:59 -03:00 committed by Xiang Xiao
parent e0da0bf6bd
commit 7ded22fb1a

View File

@ -81,7 +81,12 @@ void up_irqinitialize(void)
/* Colorize the interrupt stack for debug purposes */
#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 *)&g_intstackalloc, intstack_size);
#endif