Re: [PATCH v3 1/5] genirq: Synchronize in-flight handlers during NMI teardown
From: Doug Anderson
Date: Fri Sep 04 2026 - 12:54:49 EST
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! :-)
-Doug