]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64/efi: Don't fail check current_in_efi() if preemptible
authorBen Horgan <ben.horgan@arm.com>
Mon, 5 Jan 2026 13:58:47 +0000 (13:58 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 6 Jan 2026 11:54:31 +0000 (11:54 +0000)
As EFI runtime services can now be run without disabling preemption remove
the check for non preemptible in current_in_efi(). Without this change,
firmware errors that were previously recovered from by
__efi_runtime_kernel_fixup_exception() will lead to a kernel oops.

Fixes: a5baf582f4c0 ("arm64/efi: Call EFI runtime services without disabling preemption")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Richard Lyu <richard.lyu@suse.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/efi.h

index aa91165ca14071f0b280c6d04c44cda47a1e4e17..e8a9783235cbe0f331e68a106ca715e6faf616db 100644 (file)
@@ -45,7 +45,7 @@ void arch_efi_call_virt_teardown(void);
  * switching to the EFI runtime stack.
  */
 #define current_in_efi()                                               \
-       (!preemptible() && efi_rt_stack_top != NULL &&                  \
+       (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)