[RFC PATCH 10/36] arm64: irqflags: save and use both DAIF and PMR
Liao, Chang
liaochang1 at huawei.com
Tue Jul 14 04:30:40 PDT 2026
在 2026/7/14 17:44, Vladimir Murzin 写道:
> 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.
Understood, please keep it to hide the architectural difference, thanks for explaining.
>
> Thanks
> Vladimir
>
--
BR
Liao, Chang
More information about the linux-arm-kernel
mailing list