summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-05-23 17:16:56 +0400
committerMatt Fleming <matt.fleming@intel.com>2014-05-23 18:29:43 +0400
commit74bcc2499291d38b6253f9dbd6af33a195222208 (patch)
tree1e87bd1d058d13da248a28b07f8a92d19828a8f7
parent345c736edd07b657a8c48190baed2719b85d0938 (diff)
downloadlinux-74bcc2499291d38b6253f9dbd6af33a195222208.tar.xz
arm64: efi: only attempt efi map setup if booting via EFI
Booting a kernel with CONFIG_EFI enabled on a non-EFI system caused an oops with the current UEFI support code. Add the required test to prevent this. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--arch/arm64/kernel/efi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 7bfd65097210..14db1f6e8d7f 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -333,6 +333,9 @@ void __init efi_init(void)
void __init efi_idmap_init(void)
{
+ if (!efi_enabled(EFI_BOOT))
+ return;
+
/* boot time idmap_pg_dir is incomplete, so fill in missing parts */
efi_setup_idmap();
}