]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/platform/efi/efi.c
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / arch / x86 / platform / efi / efi.c
index ec9f3254c7f18fcd6289ed8d7d56a0225e1c9daa..5ae99f9160d9080dc9296d476c75d96623744018 100644 (file)
@@ -417,8 +417,8 @@ void __init efi_reserve_boot_services(void)
                 * - Not within any part of the kernel
                 * - Not the bios reserved area
                */
-               if ((start+size >= virt_to_phys(_text)
-                               && start <= virt_to_phys(_end)) ||
+               if ((start+size >= __pa_symbol(_text)
+                               && start <= __pa_symbol(_end)) ||
                        !e820_all_mapped(start, start+size, E820_RAM) ||
                        memblock_is_region_reserved(start, size)) {
                        /* Could not reserve, skip it */
@@ -844,7 +844,7 @@ void __init efi_enter_virtual_mode(void)
        efi_memory_desc_t *md, *prev_md = NULL;
        efi_status_t status;
        unsigned long size;
-       u64 end, systab, end_pfn;
+       u64 end, systab, start_pfn, end_pfn;
        void *p, *va, *new_memmap = NULL;
        int count = 0;
 
@@ -897,10 +897,9 @@ void __init efi_enter_virtual_mode(void)
                size = md->num_pages << EFI_PAGE_SHIFT;
                end = md->phys_addr + size;
 
+               start_pfn = PFN_DOWN(md->phys_addr);
                end_pfn = PFN_UP(end);
-               if (end_pfn <= max_low_pfn_mapped
-                   || (end_pfn > (1UL << (32 - PAGE_SHIFT))
-                       && end_pfn <= max_pfn_mapped)) {
+               if (pfn_range_is_mapped(start_pfn, end_pfn)) {
                        va = __va(md->phys_addr);
 
                        if (!(md->attribute & EFI_MEMORY_WB))