[RFC PATCH 10/36] arm64: irqflags: save and use both DAIF and PMR
Vladimir Murzin
vladimir.murzin at arm.com
Tue Jul 14 02:44:29 PDT 2026
On 7/10/26 09:11, Jinjie Ruan wrote:
>>> diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
>>> index f7dc5fb9427d..192eb97cd50b 100644
>>> --- a/arch/arm64/include/asm/ptrace.h
>>> +++ b/arch/arm64/include/asm/ptrace.h
>>> @@ -205,7 +205,7 @@ static inline void forget_syscall(struct pt_regs *regs)
>>>
>>> #define irqs_priority_unmasked(regs) \
>>> (system_uses_irq_prio_masking() ? \
>>> - (regs)->pmr == GIC_PRIO_IRQON : \
>>> + (regs)->pmr >= GIC_PRIO_IRQON : \
>>> true)
>>>
>>> static __always_inline bool regs_irqs_disabled(const struct pt_regs *regs)
>> Is there any reason to keep interrupt_enabled()? It appears to be rarely used
>> across interrupt and exception code. So far, i've only found a single use in
>> gic_handle_irq(), corret me if i'm wrong. So using regs_irqs_disable() directly
>> might reduce the number of small helper that people need to remember.
> For arm32.
Indeed, gic_handle_irq() is shared between arm64 and arm32, and latter
doesn't provide regs_irqs_disabled(), thus we have to keep
interrupt_enabled() for now.
Thanks
Vladimir
More information about the linux-arm-kernel
mailing list