arch/arm/src/lc823450: Fix setintstack macro in chip.h. In case of CONFIG_SMP=y, g_cpu0_instack_base and g_cpu1_instack_base

are not allocated just after g_instack_alloc but these values show the addresses for interrupt stack of each CPU. So to set the stack
pointer based on these variables, temporal register has to be used.
This commit is contained in:
Masayuki Ishikawa 2018-06-27 06:50:00 -06:00 committed by Gregory Nutt
parent dfd2d218e3
commit 529ac8dd9b

View File

@ -47,6 +47,7 @@
# include <arch/lc823450/irq.h>
# include "up_arch.h"
# include "lc823450_irq.h"
# include "up_arch.h"
#endif
/****************************************************************************
@ -105,13 +106,16 @@
and \tmp1, \tmp1, 1 /* \tmp = COREID */
cmp \tmp1, #0
bne 1f
ldr sp, =g_cpu0_instack_base
ldr \tmp1, =g_cpu0_instack_base
ldr sp, [\tmp1, 0] /* sp = getreg32(g_cpu0_instack_base) */
b 2f
1:
ldr sp, =g_cpu1_instack_base
ldr \tmp1, =g_cpu1_instack_base
ldr sp, [\tmp1, 0] /* sp = getreg32(g_cpu1_instack_base) */
2:
#else
ldr sp, =g_cpu0_instack_base
ldr \tmp1, =g_cpu0_instack_base
ldr sp, [\tmp1, 0] /* sp = getreg32(g_cpu0_instack_base) */
#endif
.endm
#endif /* CONFIG_SMP && CONFIG_ARCH_INTERRUPTSTACK > 7 */