From: Paul Sherman <shermanpauldylan@gmail.com>
To: Samuel Holland <samuel.holland@sifive.com>
Cc: palmer@dabbelt.com, pjw@kernel.org, alex@ghiti.fr,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: smp: fix non-SPINWAIT secondary hart rendezvous for fw_dynamic platforms
Date: Wed, 29 Jul 2026 18:43:20 -0700 [thread overview]
Message-ID: <amqsOI7Pdg5uH-bO@got-milk> (raw)
In-Reply-To: <51f32966-86a2-456e-9e45-c9bf8add0676@sifive.com>
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
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-07-30 1:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 8:34 [PATCH] riscv: smp: fix non-SPINWAIT secondary hart rendezvous for fw_dynamic platforms Paul Sherman
2026-07-29 22:13 ` Samuel Holland
2026-07-30 1:43 ` Paul Sherman [this message]
2026-07-30 10:16 ` Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amqsOI7Pdg5uH-bO@got-milk \
--to=shermanpauldylan@gmail.com \
--cc=alex@ghiti.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=samuel.holland@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox