Re: [PATCH v3 1/5] genirq: Synchronize in-flight handlers during NMI teardown
From: Doug Anderson
Date: Mon Sep 28 2026 - 12:17:13 EST
Hi,
On Fri, Sep 4, 2026 at 8:26 AM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> On Fri, Sep 4, 2026 at 8:11 AM Thomas Gleixner <tglx@xxxxxxxxxx> wrote:
> >
> > The driver change is here:
> >
> > [1] https://lore.kernel.org/all/20260902-qcom-wdt-nmi-series-v3-5-f3999362a9ea@xxxxxxxxxx/
> >
> > > @@ -311,10 +321,25 @@ static int qcom_wdt_probe(struct platform_device *pdev)
> > > if (irq < 0 && irq != -ENXIO)
> > > return irq;
> > > if (irq > 0) {
> > > - ret = devm_request_irq(dev, irq, qcom_wdt_isr, 0,
> > > - "wdt_bark", &wdt->wdd);
> > > - if (ret)
> > > - return ret;
> > > + wdt->irq = irq;
> > > + irq_flags = IRQF_PERCPU | IRQF_NOBALANCING |
> > > + IRQF_NO_AUTOEN | IRQF_NO_THREAD;
> > > +
> > > + ret = request_nmi(irq, qcom_wdt_isr, irq_flags,
> > > + "wdt_bark", &wdt->wdd);
> >
> > Of course this is a regular global interrupt otherwise it couldn't be
> > requested normally. So this sets IRQF_PERCPU (it has to otherwise
> > request_nmi() would fail), but that looks like a hack to me.
>
> At least on GIC, promoting a regular global interrupt to NMI (or
> pseudo-NMI) level is possible, and Mayank's use case here seems
> legitimate. Any suggestions you have for making this look less like a
> hack are appreciated! :-)
Throwing an extra plea out here to see if we can make forward
progress. IMO being able to make watchdog driver "bark" interrupts run
at NMI (or pseudo-NMI) level is an important thing to do for
debuggability of the kernel. It sounds as if there are no general
objections to the idea. I guess the next step is to make this look
less hacky. Is that something we could send patches for? Any hints for
what you'd like this to look like would be greatly appreciated.
I'll also be in Prague next week for both Plumbers and ELCE, so I'd be
happy to discuss this in person if that helps.
-Doug