Skip to content

riscv: A few SMP fixes

Andrew Jones kvm kvm-riscv 1 version Applied

Status from this message: Merged to master through riscv/queue.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4riscv: Bump NR_CPUS to 256lib/riscv/asm/setup.h+1 -10 replies
2/4riscv: Filter unmanaged harts from present masklib/riscv/setup.c+8 -30 replies
3/4riscv: Fix secondary_entryriscv/cstart.S+3 -30 replies
4/4riscv: Rework smp_boot_secondarylib/riscv/asm/processor.h lib/riscv/smp.c riscv/cstart.S+36 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [kvm-unit-tests PATCH 0/4] riscv: A few SMP fixes

tl;dr - these patches are improvement to the riscv framework to better support the SBI HSM tests.

The first patch is a simpler alternative to [1] and [2] which doesn't require us to decide how best to make the number configurable. The second patch just adds sanity checking to make sure we can expect the SBI implementation to accept all hartids mapped from the present mask. The third patch was already posted once before[3] with a slightly different summary. It and the last patch improve smp_boot_secondary() since the SBI HSM tests were attempting to make workarounds for odd behaviors.

[1] https://lore.kernel.org/all/20240820170150.377580-2-andrew.jones at linux.dev/
[2] https://lore.kernel.org/all/20240903143946.834864-6-andrew.jones at linux.dev/
[3] https://lore.kernel.org/all/20240904120812.1798715-2-andrew.jones at linux.dev/

Andrew Jones (4):
riscv: Bump NR_CPUS to 256
riscv: Filter unmanaged harts from present mask
riscv: Fix secondary_entry
riscv: Rework smp_boot_secondary

 lib/riscv/asm/processor.h |  1 +
 lib/riscv/asm/setup.h     |  2 +-
 lib/riscv/setup.c         | 11 ++++++---
 lib/riscv/smp.c           | 49 +++++++++++++++++++++++++++------------
 riscv/cstart.S            |  7 +++---
 5 files changed, 48 insertions(+), 22 deletions(-)
Signature · 1 line
2.47.0