[RFC PATCH 14/36] arm64: interrupts: introduce generic interrupt masking helpers
Vladimir Murzin
vladimir.murzin at arm.com
Wed Jul 15 05:47:15 PDT 2026
On 7/14/26 13:45, Jinjie Ruan wrote:
>> +#else /* CONFIG_DEBUG_IRQFLAGS */
>> +static inline
>> +void local_all_irqs_cpu_init_mask(arm64_exc_context_t context)
>> +{
>> + if (context == PROCESS_CONTEXT)
>> + trace_hardirqs_on();
>> + arm64_update_exc_context(context, true);
>> +}
>> +
>> +static inline void local_all_irqs_final_mask(void)
>> +{
>> + arm64_update_exc_context(CRITICAL_CONTEXT, true);
>> + trace_hardirqs_off();
>> +}
>> +#endif /* CONFIG_DEBUG_IRQFLAGS */
> The implementations of local_all_irqs_cpu_init_mask() and
> local_all_irqs_final_mask() are partially the same when the
> CONFIG_DEBUG_IRQFLAGS switch is enabled or not.
>
> Should we provide only one version of the implementation and use
> CONFIG_DEBUG_IRQFLAGS to isolate the debug-related code?
It seems that for the debug code I either need to find an alternative
implementation or move it into a C file.
Thanks
Vladimir
More information about the linux-arm-kernel
mailing list