[RFC PATCH v2 39/45] arm64: smp: Fall back to IRQ when IPI NMI request fails
Vladimir Murzin
vladimir.murzin at arm.com
Fri Aug 21 03:20:51 PDT 2026
On 8/13/26 10:20, Jinjie Ruan wrote:
>
> 在 2026/7/28 0:34, Vladimir Murzin 写道:
>> Existing IPI setup logic relies on ipi_should_be_nmi() to decide
>> whether to request an NMI (if supported) or an ordinary IRQ. If NMI is
>> not supported, using an ordinary IRQ is acceptable.
>>
>> FEAT_NMI requires complementary support in the interrupt
>> controller. If FEAT_NMI is present but interrupt controller support is
>> absent, request_percpu_nmi() can fail.
>>
>> One way to prevent this would be to extend ipi_should_be_nmi() to also
>> check for interrupt controller support. However, since falling back to
>> an ordinary IRQ is acceptable, treat ipi_should_be_nmi() as a hint
>> instead. Whether an IPI is actually registered as an NMI is determined
>> by the success or failure of request_percpu_nmi(). If the request
>> fails, fall back to request_irq().
>>
>> Track which IPIs were actually registered as NMIs and use that state
>> in the per-CPU enable and disable paths. This avoids calling the
>> percpu NMI helpers for an IPI that fell back to regular IRQ handling.
> Hi Vladimir,
>
> Should we update the following comment and mention that "regular IPI
> will also be used when the nmi_bitmap is not set"?
>
> 936 void arch_trigger_cpumask_backtrace(const cpumask_t *mask, int
> exclude_cpu)
> 937 {
> 938 >-------/*
> 939 >------- * NOTE: though nmi_trigger_cpumask_backtrace() has "nmi_"
> in the name,
> 940 >------- * nothing about it truly needs to be implemented using an
> NMI, it's
> 941 >------- * just that it's _allowed_ to work with NMIs. If
> ipi_should_be_nmi()
> 942 >------- * returned false our backtrace attempt will just use a
> regular IPI.
> 943 >------- */
> 944 >-------nmi_trigger_cpumask_backtrace(mask, exclude_cpu,
> arm64_backtrace_ipi);
> 945 }
>
Something like
- * just that it's _allowed_ to work with NMIs. If ipi_should_be_nmi()
- * returned false our backtrace attempt will just use a regular IPI.
+ * just that it's _allowed_ to work with NMIs. If we failed request
+ * NMI our backtrace attempt will just use a regular IPI.
> otherwise, LGTM
> Reviewed-by: Jinjie Ruan <ruanjinjie at huawei.com>
Cheers
Vladimir
More information about the linux-arm-kernel
mailing list