[RFC PATCH 23/36] arm64/efi: Implement override for IRQ flags checks
Jinjie Ruan
ruanjinjie at huawei.com
Wed Jul 15 05:09:52 PDT 2026
On 7/15/2026 8:00 PM, Vladimir Murzin wrote:
> On 7/13/26 09:22, Jinjie Ruan wrote:
>>> diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
>>> index e8a9783235cb..479741d52c90 100644
>>> --- a/arch/arm64/include/asm/efi.h
>>> +++ b/arch/arm64/include/asm/efi.h
>>> @@ -5,6 +5,7 @@
>>> #include <asm/boot.h>
>>> #include <asm/cpufeature.h>
>>> #include <asm/fpsimd.h>
>>> +#include <asm/interrupts/common_flags.h>
>>> #include <asm/io.h>
>>> #include <asm/memory.h>
>>> #include <asm/mmu_context.h>
>>> @@ -48,18 +49,43 @@ void arch_efi_call_virt_teardown(void);
>>> (efi_rt_stack_top != NULL && \
>>> on_task_stack(current, READ_ONCE(efi_rt_stack_top[-1]), 1))
>>>
>>> -#define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
>>> -
>>> /*
>>> * Even when Linux uses IRQ priorities for IRQ disabling, EFI does not.
>>> * And EFI shouldn't really play around with priority masking as it is not aware
>>> * which priorities the OS has assigned to its interrupts.
>> Can this comment be deleted?
>
> The comment still looks valid to me. Why should it be deleted?
The current implementation of arch_local_save_flags() can already know
the PMR status.
112 static __always_inline unsigned long arch_local_save_flags(void)
113 {
114 >-------arm64_exc_hwstate_t hwstate = { .daif = read_sysreg(daif) };
115
116 >-------if (system_uses_nmi())
117 >------->-------hwstate.allint = read_sysreg_s(SYS_ALLINT);
118
119 >-------if (system_uses_irq_prio_masking())
120 >------->-------hwstate.pmr = read_sysreg_s(SYS_ICC_PMR_EL1);
121
122 >-------return hwstate.flags;
123 }
>
> Cheers
> Vladimir
>
More information about the linux-arm-kernel
mailing list