aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/x86-stub.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-04-16 18:45:24 +0200
committerArd Biesheuvel <ardb@kernel.org>2020-04-24 14:52:16 +0200
commit980771f616624e4c563a2014a32b7d23876d1ecf (patch)
tree40428259c35ee0ab519129a6277127cb08953a3a /drivers/firmware/efi/libstub/x86-stub.c
parentccc27ae77494252965aedca68588e7457829cfad (diff)
downloadkernel_replicant_linux-980771f616624e4c563a2014a32b7d23876d1ecf.tar.gz
kernel_replicant_linux-980771f616624e4c563a2014a32b7d23876d1ecf.tar.bz2
kernel_replicant_linux-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/x86-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/x86-stub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index 3f132f51ab0f..bddbc103a34b 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -427,7 +427,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
if (status != EFI_SUCCESS)
goto fail2;
- if (!noinitrd()) {
+ if (!efi_noinitrd) {
status = efi_load_initrd(image, &ramdisk_addr,
&ramdisk_size,
hdr->initrd_addr_max,
@@ -787,7 +787,7 @@ unsigned long efi_main(efi_handle_t handle,
* permit an initrd loaded from the LINUX_EFI_INITRD_MEDIA_GUID device
* path to supersede it.
*/
- if (!noinitrd()) {
+ if (!efi_noinitrd) {
unsigned long addr, size;
status = efi_load_initrd_dev_path(&addr, &size, ULONG_MAX);