aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-05-23 14:16:56 +0100
committerMark Brown <broonie@linaro.org>2014-08-08 20:21:07 +0100
commitc7aae4d46ea5c7fb51edd68839588967ef2a7536 (patch)
treeb0e0a8f1b651c40720bad04c55c1ad489c068f65
parentcdfa59f5c33f353fad6a4df93434e88535f75da0 (diff)
downloadlinux-linaro-stable-v3.14/topic/arm64-efi.tar.gz
arm64: efi: only attempt efi map setup if booting via EFIv3.14/topic/arm64-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> (cherry picked from commit 74bcc2499291d38b6253f9dbd6af33a195222208) Signed-off-by: Mark Brown <broonie@linaro.org>
-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();
}