[RFC PATCH v2 32/45] arm64: nmi: Manage masking for superpriority interrupts
Vladimir Murzin
vladimir.murzin at arm.com
Mon Aug 3 05:28:47 PDT 2026
On 7/28/26 13:14, Jinjie Ruan wrote:
>> @@ -194,10 +218,21 @@ void __arm64_update_exc_hwstate(arm64_exc_hwstate_t hwstate, bool force)
>> write_sysreg_s(hwstate.pmr, SYS_ICC_PMR_EL1);
>> }
>>
>> + /*
>> + * Try to order ALLINT writes to be consistent with the DAIF state :
>> + * we don't want to take an NMI with DAIF masked or when it should
>> + * be masked but isn't yet.
>> + */
>> + if (system_uses_nmi() && hwstate.allint && force)
>
> hwstate.allint & ALLINT_ALLINT
>
Fair enough.
>> + _allint_set();
>> +
>> barrier();
>> write_sysreg(hwstate.daif, daif);
>> barrier();
>>
>> + if (system_uses_nmi() && !hwstate.allint && force)
> !(hwstate.allint & ALLINT_ALLINT)
>
Fair enough.
I'll fix both of them in the next version.
Thanks
Vladimir
>> + _allint_clear();
>> +
>> if (system_uses_irq_prio_masking() &&
>> hwstate.pmr == GIC_PRIO_IRQON &&
>> force) {
More information about the linux-arm-kernel
mailing list