diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-04-16 18:45:24 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-04-24 14:52:16 +0200 |
commit | 980771f616624e4c563a2014a32b7d23876d1ecf (patch) | |
tree | 40428259c35ee0ab519129a6277127cb08953a3a /drivers/firmware/efi/libstub/efistub.h | |
parent | ccc27ae77494252965aedca68588e7457829cfad (diff) | |
download | lwn-980771f616624e4c563a2014a32b7d23876d1ecf.tar.gz lwn-980771f616624e4c563a2014a32b7d23876d1ecf.zip |
efi/libstub: Drop __pure getters for EFI stub options
The practice of using __pure getter functions to access global
variables in the EFI stub dates back to the time when we had to
carefully prevent GOT entries from being emitted, because we
could not rely on the toolchain to do this for us.
Today, we use the hidden visibility pragma for all EFI stub source
files, which now all live in the same subdirectory, and we apply a
sanity check on the objects, so we can get rid of these getter
functions and simply refer to global data objects directly.
So switch over the remaining boolean variables carrying options set
on the kernel command line.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/efistub.h')
-rw-r--r-- | drivers/firmware/efi/libstub/efistub.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index c1481c5abea4..5ff63230a1f1 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -25,11 +25,11 @@ #define EFI_ALLOC_ALIGN EFI_PAGE_SIZE #endif -extern bool __pure nochunk(void); -extern bool __pure nokaslr(void); -extern bool __pure noinitrd(void); -extern bool __pure is_quiet(void); -extern bool __pure novamap(void); +extern bool efi_nochunk; +extern bool efi_nokaslr; +extern bool efi_noinitrd; +extern bool efi_quiet; +extern bool efi_novamap; extern const efi_system_table_t *efi_system_table; @@ -50,7 +50,7 @@ extern const efi_system_table_t *efi_system_table; #endif #define pr_efi(msg) do { \ - if (!is_quiet()) efi_printk("EFI stub: "msg); \ + if (!efi_quiet) efi_printk("EFI stub: "msg); \ } while (0) #define pr_efi_err(msg) efi_printk("EFI stub: ERROR: "msg) |