aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/platform/efi/efi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 00f4cc566adb..d3096c0aa941 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -724,6 +724,7 @@ static void __init kexec_enter_virtual_mode(void)
724 */ 724 */
725 if (!efi_is_native()) { 725 if (!efi_is_native()) {
726 efi_unmap_memmap(); 726 efi_unmap_memmap();
727 clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
727 return; 728 return;
728 } 729 }
729 730
@@ -797,6 +798,7 @@ static void __init __efi_enter_virtual_mode(void)
797 new_memmap = efi_map_regions(&count, &pg_shift); 798 new_memmap = efi_map_regions(&count, &pg_shift);
798 if (!new_memmap) { 799 if (!new_memmap) {
799 pr_err("Error reallocating memory, EFI runtime non-functional!\n"); 800 pr_err("Error reallocating memory, EFI runtime non-functional!\n");
801 clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
800 return; 802 return;
801 } 803 }
802 804
@@ -804,8 +806,10 @@ static void __init __efi_enter_virtual_mode(void)
804 806
805 BUG_ON(!efi.systab); 807 BUG_ON(!efi.systab);
806 808
807 if (efi_setup_page_tables(__pa(new_memmap), 1 << pg_shift)) 809 if (efi_setup_page_tables(__pa(new_memmap), 1 << pg_shift)) {
810 clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
808 return; 811 return;
812 }
809 813
810 efi_sync_low_kernel_mappings(); 814 efi_sync_low_kernel_mappings();
811 efi_dump_pagetable(); 815 efi_dump_pagetable();