Skip to content

Commit 1068cb5

Browse files
ardbiesheuvelctmarinas
authored andcommitted
arm64/efi: Drop efi_rt_lock spinlock from EFI arch wrapper
Since commit 5894cf5 ("acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers") all EFI runtime calls on arm64 are routed via the EFI runtime wrappers, which are serialized using the efi_runtime_lock semaphore. This means the efi_rt_lock spinlock in the arm64 arch wrapper code has become redundant, and can be dropped. For robustness, replace it with an assert that the EFI runtime lock is in fact held by 'current'. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 7137a20 commit 1068cb5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

arch/arm64/kernel/efi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,16 @@ asmlinkage efi_status_t efi_handle_corrupted_x18(efi_status_t s, const char *f)
165165
return s;
166166
}
167167

168-
static DEFINE_RAW_SPINLOCK(efi_rt_lock);
169-
170168
void arch_efi_call_virt_setup(void)
171169
{
170+
efi_runtime_assert_lock_held();
172171
efi_virtmap_load();
173-
raw_spin_lock(&efi_rt_lock);
174172
__efi_fpsimd_begin();
175173
}
176174

177175
void arch_efi_call_virt_teardown(void)
178176
{
179177
__efi_fpsimd_end();
180-
raw_spin_unlock(&efi_rt_lock);
181178
efi_virtmap_unload();
182179
}
183180

0 commit comments

Comments
 (0)