mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
arch/risc-v: fix idle stack assign order
Thebc022f8cd8introduces 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:
committed by
Masayuki Ishikawa
parent
bc022f8cd8
commit
4d2d9ecf39
@@ -68,7 +68,7 @@ EXTERN uintptr_t g_idle_topstack;
|
||||
/* Address of per-cpu idle stack base */
|
||||
|
||||
#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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user