Re: [PATCH v2 2/5] genirq: Implement synchronous disable_nmi()
From: Doug Anderson
Date: Mon Aug 31 2026 - 17:11:29 EST
Hi,
On Fri, Aug 28, 2026 at 6:00 PM Mayank Rungta <mrungta@xxxxxxxxxx> wrote:
>
> Currently, disable_nmi_nosync() is the only interface to disable an NMI
> line. Drivers stopping their devices in process context need a synchronous
> variant that guarantees any running instance of the NMI handler has
> completed on other CPUs before returning.
>
> Implement disable_nmi() by wrapping disable_irq().
>
> Assisted-by: Antigravity:gemini
> Signed-off-by: Mayank Rungta <mrungta@xxxxxxxxxx>
> ---
> include/linux/interrupt.h | 1 +
> kernel/irq/manage.c | 15 +++++++++++++++
> 2 files changed, 16 insertions(+)
This looks right to me.
Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
Sashiko had feedback [1] where it was worried about tightly looping
doing HW polling. To me, that doesn't seem like a big deal since there
shouldn't be many NMI users and NMIs shouldn't be freed often. Perhaps
Thomas has different thoughts.
[1] https://lore.kernel.org/all/20260829011853.0B9A41F000E9@xxxxxxxxxxxxxxx/