[PATCH] riscv: Enable interrupt during exception handling

Sebastian Andrzej Siewior bigeasy at linutronix.de
Tue Jun 24 07:11:30 PDT 2025


On 2025-06-24 16:08:15 [+0200], Peter Zijlstra wrote:
> > >>
> > >> I also had a series which was doing so for misaligned accesses handling,
> > >> but after discussion, it was not ok to do so.:
> > >>
> > >> https://lore.kernel.org/linux-riscv/20250422094419.GC14170@noisy.programming.kicks-ass.net/
> > > 
> > > If I understand that right, exceptions from kernel should be treated as
> > > NMI, so that lockdep can tell us if exception handlers touch locks.
> > > 
> > > But (conditionally) enabling interrupts does not lose us that benefit. It
> > > is still considered NMI by lockdep.
> > > 
> > > Unless I miss something, the patch is fine as is.
> 
> I'm confused, you're wanting to conditionally enable interrupts from a
> kernel exception while its NMI like? *WHY* ?!

What we want is to enable interrupt handling if it was enabled before
the exception occured. So we can send a proper signal on PREEMPT_RT
without chocking on spinlock_t/ sighand.

Sebastian



More information about the linux-riscv mailing list