Re: [PATCH] riscv: smp: fix non-SPINWAIT secondary hart rendezvous for fw_dynamic platforms
Paul Sherman <[email protected]> Wed, 29 Jul 2026 18:43:20 -0700
| Newsgroups | org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <amqsOI7Pdg5uH-bO@got-milk> |
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 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv