[PATCH] riscv: smp: fix non-SPINWAIT secondary hart rendezvous for fw_dynamic platforms
Paul Sherman
shermanpauldylan at gmail.com
Wed Jul 29 18:43:20 PDT 2026
Hi Samuel,
Thank you for the explanation and the pointer to the boot protocol
documentation.
On Wed, Jul 29, 2026 at 05:13:56PM -0500, Samuel Holland wrote:
>
> There is no need to handle SBI_ERR_ALREADY_STARTED because the contract for the
> "ordered booting" entry method (see
> https://kernel.org/doc/html/latest/arch/riscv/boot.html#kernel-entry) requires
> that only one hart is in the STARTED state when the kernel begins executing.
I agree that the documented ordered booting contract requires only
one hart to enter the kernel initially, and that HART_START should
therefore not return SBI_ERR_ALREADY_STARTED.
> It sounds like your firmware implements something closer to the
> RISCV_BOOT_SPINWAIT entry method, so if you disable CONFIG_RISCV_BOOT_SPINWAIT,
> it is unsurprising that there would be problems.
On the SG2042 platform I'm investigating, however, that is the
behavior I'm observing on shipping hardware. My investigation so far
has focused on making Linux recover from that situation. Based on
your reply, I'm now wondering whether the more appropriate fix is
in the platform firmware or OpenSBI instead.
> Why doesn't your firmware do that? Can you fix your firmware?
Is your expectation that platforms exhibiting this behavior should
be corrected to satisfy the ordered booting contract, rather than
Linux handling SBI_ERR_ALREADY_STARTED defensively?
Thanks,
Paul
More information about the linux-riscv
mailing list