Skip to content

Commit

Permalink
efi/x86: Merge assignments of efi.runtime_version
Browse files Browse the repository at this point in the history
efi.runtime_version is always set to the same value on both
existing code paths, so just set it earlier from a shared one.

Tested-by: Tony Luck <tony.luck@intel.com> # arch/ia64
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
  • Loading branch information
Ard Biesheuvel committed Feb 23, 2020
1 parent 9cd437a commit 0930801
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions arch/x86/platform/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ static int __init efi_systab_init(u64 phys)
efi_systab.tables = systab32->tables;
}

efi.runtime_version = hdr->revision;

efi_systab_report_header(hdr, efi_systab.fw_vendor);
early_memunmap(p, size);

Expand Down Expand Up @@ -870,15 +872,6 @@ static void __init kexec_enter_virtual_mode(void)
}

efi_sync_low_kernel_mappings();

/*
* Now that EFI is in virtual mode, update the function
* pointers in the runtime service table to the new virtual addresses.
*
* Call EFI services through wrapper functions.
*/
efi.runtime_version = efi_systab.hdr.revision;

efi_native_runtime_setup();
#endif
}
Expand Down Expand Up @@ -965,14 +958,6 @@ static void __init __efi_enter_virtual_mode(void)

efi_free_boot_services();

/*
* Now that EFI is in virtual mode, update the function
* pointers in the runtime service table to the new virtual addresses.
*
* Call EFI services through wrapper functions.
*/
efi.runtime_version = efi_systab.hdr.revision;

if (!efi_is_mixed())
efi_native_runtime_setup();
else
Expand Down

0 comments on commit 0930801

Please sign in to comment.