diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-08-08 12:47:51 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2023-08-22 10:39:26 +0200 |
commit | 3c17ae4161093fa2263b70064e34a033dc16fef5 (patch) | |
tree | 3bf6bdf15342a3966694904385e4072806014c12 /include/linux/efi.h | |
parent | e38abdab441c0dcfb8f28dd0daf1dfa44b494492 (diff) |
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>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 28ac4e4a725d..e0b346b014df 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1129,7 +1129,7 @@ extern bool efi_runtime_disabled(void); static inline bool efi_runtime_disabled(void) { return true; } #endif -extern void efi_call_virt_check_flags(unsigned long flags, const char *call); +extern void efi_call_virt_check_flags(unsigned long flags, const void *caller); extern unsigned long efi_call_virt_save_flags(void); enum efi_secureboot_mode { @@ -1196,7 +1196,7 @@ static inline void efi_check_for_embedded_firmwares(void) { } \ __flags = efi_call_virt_save_flags(); \ __s = arch_efi_call_virt(p, f, args); \ - efi_call_virt_check_flags(__flags, __stringify(f)); \ + efi_call_virt_check_flags(__flags, NULL); \ \ arch_efi_call_virt_teardown(); \ \ @@ -1257,6 +1257,7 @@ union efi_rts_args; * @status: Status of executing EFI Runtime Service * @efi_rts_id: EFI Runtime Service function identifier * @efi_rts_comp: Struct used for handling completions + * @caller: The caller of the runtime service */ struct efi_runtime_work { union efi_rts_args *args; @@ -1264,6 +1265,7 @@ struct efi_runtime_work { struct work_struct work; enum efi_rts_ids efi_rts_id; struct completion efi_rts_comp; + const void *caller; }; extern struct efi_runtime_work efi_rts_work; |