[PATCH RFC] riscv: disable local interrupts and stop other CPUs before restart
Anand Moon
linux.amoon at gmail.com
Sat Apr 25 10:42:42 PDT 2026
Hi All,
On Fri, 24 Apr 2026 at 02:21, Aurelien Jarno <aurelien at aurel32.net> wrote:
>
> Hi,
>
> On 2026-03-16 08:19, Samuel Holland wrote:
> > Hi Troy,
> >
> > On 2026-03-16 2:23 AM, Troy Mitchell wrote:
> > >> I think the reason we ended up with the "unsafe" implementations of the
> > >> reboot/shutdown functions is that on the backend it is usually SBI SRST
> > >> calls, which can protect itself from other CPUs and interrupts. Since on
> > >> K1 we're going to be poking I2C directly, we run into the problem
> > >> described above. So all of these should disable interrupts and stop
> > >> other CPUs before calling the handlers, and can't assume the handlers
> > >> are all SBI SRST.
> > > Yes, we cannot assume that all platforms rely on this.
> >
> > Why isn't K1 using the SBI SRST extension? Resetting the platform from S-mode
> > directly causes problems if you ever want to run another supervisor domain (for
> > example a TEE or EFI runtime services), which may need to clean up before a
> > system reset.
> >
> > As you mention, other platforms use the standard SBI SRST interface, event if
> > they need to poke a PMIC to perform a system reset. Is there something
> > preventing K1 from following this path?
>
> I went this path and submitted a patchset to OpenSBI mailing list doing
> that:
> https://lore.kernel.org/opensbi/20260419150857.2705843-1-aurelien@aurel32.net/T/#t
>
I just wanted to check if we can use the latest OpenSBI image with
vendor u-boot ?
If so, can you share the details of flash the u-boot and OpenSBI binaries? .
I was working on the watchdog driver, and the system hangs at reboot
So, what changes do we need to make in OpenSBI to handle this issue?
> Regards
> Aurelien
>
Thanks
-Anand
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien at aurel32.net http://aurel32.net
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
More information about the linux-riscv
mailing list