RE: [PATCH 3/3] irqchip/renesas-rzg2l: Add NMI support
From: Biju Das
Date: Tue Mar 31 2026 - 13:33:49 EST
Hi Thomas,
Thanks for the feedback.
> -----Original Message-----
> From: Thomas Gleixner <tglx@xxxxxxxxxx>
> Sent: 31 March 2026 17:16
> Subject: Re: [PATCH 3/3] irqchip/renesas-rzg2l: Add NMI support
>
> On Sat, Mar 28 2026 at 10:33, Biju wrote:
> > +static void rzg2l_irqc_nmi_eoi(struct irq_data *d) {
> > + struct rzg2l_irqc_priv *priv = irq_data_to_priv(d);
> > + unsigned int hw_irq = irqd_to_hwirq(d);
> > +
> > + scoped_guard(raw_spinlock, &priv->lock)
> > + rzg2l_clear_nmi_int(priv, hw_irq);
>
> Is priv is shared between regular interrupts and the NMI?
Yes.
>
> If so, then you can't take the lock.
OK.
>
> // Some other context (task, interrupt)
> raw_spinlock(priv->lock);
>
> --> NMI
>
> raw_spinlock(priv->lock);
>
> --> Livelock.
Will drop the lock as it is not RMW operation.
Cheers,
Biju