Skip to content

Commit

Permalink
riscv_macros.S: Allow using riscv_set_inital_sp for hart > 0
Browse files Browse the repository at this point in the history
In non-SMP mode there is only a single idlestack, so use that in all cases
instead of offsetting by hart ID.
  • Loading branch information
pussuw committed Oct 14, 2024
1 parent 95ea59a commit 1841712
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/risc-v/src/common/riscv_macros.S
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@
.macro riscv_set_inital_sp base, size, hartid
la t0, \base
li t1, \size
#ifdef CONFIG_SMP
mul t1, \hartid, t1
#endif
add t0, t0, t1

/* ensure the last XCPTCONTEXT_SIZE is reserved for non boot CPU */
Expand Down

0 comments on commit 1841712

Please sign in to comment.