arch/risc-v: fix idle stack assign order
Thebc022f8cd8
introduces a static way to calculate idle stack address for risc-v platform. However, it uses the reverse order to access idle stack, which breaks boards with smp configuration. Correct the idle stack order of g_cpux_idlestack. Fixes:bc022f8cd8
("arch/risc-v: unify idle stack calculation") Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
This commit is contained in:
parent
bc022f8cd8
commit
4d2d9ecf39
@ -68,7 +68,7 @@ EXTERN uintptr_t g_idle_topstack;
|
|||||||
/* Address of per-cpu idle stack base */
|
/* Address of per-cpu idle stack base */
|
||||||
|
|
||||||
#define g_cpux_idlestack(cpuid) \
|
#define g_cpux_idlestack(cpuid) \
|
||||||
(g_idle_topstack - SMP_STACK_SIZE * ((cpuid) + 1))
|
(g_idle_topstack - SMP_STACK_SIZE * (CONFIG_SMP_NCPUS - (cpuid)))
|
||||||
|
|
||||||
/* Address of the saved user stack pointer */
|
/* Address of the saved user stack pointer */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user