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/efi-stub-helper.c | |
parent | ccc27ae77494252965aedca68588e7457829cfad (diff) |
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/efi-stub-helper.c')
-rw-r--r-- | drivers/firmware/efi/libstub/efi-stub-helper.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index 0b1688b10ddc..1c92ac231f94 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -12,34 +12,15 @@ #include "efistub.h" -static bool efi_nochunk; -static bool efi_nokaslr; -static bool efi_noinitrd; -static bool efi_quiet; -static bool efi_novamap; +bool efi_nochunk; +bool efi_nokaslr; +bool efi_noinitrd; +bool efi_quiet; +bool efi_novamap; + static bool efi_nosoftreserve; static bool efi_disable_pci_dma = IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA); -bool __pure nochunk(void) -{ - return efi_nochunk; -} -bool __pure nokaslr(void) -{ - return efi_nokaslr; -} -bool __pure noinitrd(void) -{ - return efi_noinitrd; -} -bool __pure is_quiet(void) -{ - return efi_quiet; -} -bool __pure novamap(void) -{ - return efi_novamap; -} bool __pure __efi_soft_reserve_enabled(void) { return !efi_nosoftreserve; |