efi/runtime-wrappers: Don't duplicate setup/teardown code
authorArd Biesheuvel <ardb@kernel.org>
Tue, 8 Aug 2023 10:47:51 +0000 (12:47 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 22 Aug 2023 08:39:26 +0000 (10:39 +0200)
commit3c17ae4161093fa2263b70064e34a033dc16fef5
tree3bf6bdf15342a3966694904385e4072806014c12
parente38abdab441c0dcfb8f28dd0daf1dfa44b494492
efi/runtime-wrappers: Don't duplicate setup/teardown code

Avoid duplicating the EFI arch setup and teardown routine calls numerous
times in efi_call_rts(). Instead, expand the efi_call_virt_pointer()
macro into efi_call_rts(), taking the pre and post parts out of the
switch.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/runtime-wrappers.c
include/linux/efi.h