Re: [PATCH 3/3] irqchip/renesas-rzg2l: Add NMI support

From: Thomas Gleixner

Date: Tue Mar 31 2026 - 12:23:07 EST


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?

If so, then you can't take the lock.

// Some other context (task, interrupt)
raw_spinlock(priv->lock);

--> NMI

raw_spinlock(priv->lock);

--> Livelock.

Thanks,

tglx