diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-04 20:20:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-04 20:20:10 +0100 |
commit | 6d2e91bf80e4410207f01edb0962aec9213f3533 (patch) | |
tree | d9e63711b0958748accff409596eca742a3c360b /arch/x86/kernel/efi.c | |
parent | 6298e719cf388f43b674f43799af467d3e4e5aa7 (diff) | |
parent | dd39ecf522ba86c70809715af46e6557f6491131 (diff) |
Merge branch 'x86/urgent' into x86/mm
Conflicts:
arch/x86/include/asm/fixmap_64.h
Semantic merge:
arch/x86/include/asm/fixmap.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/efi.c')
-rw-r--r-- | arch/x86/kernel/efi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index b205272ad39..1736acc4d7a 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c @@ -469,7 +469,7 @@ void __init efi_enter_virtual_mode(void) efi_memory_desc_t *md; efi_status_t status; unsigned long size; - u64 end, systab, addr, npages; + u64 end, systab, addr, npages, end_pfn; void *p, *va; efi.systab = NULL; @@ -481,7 +481,10 @@ void __init efi_enter_virtual_mode(void) size = md->num_pages << EFI_PAGE_SHIFT; end = md->phys_addr + size; - if (PFN_UP(end) <= max_low_pfn_mapped) + end_pfn = PFN_UP(end); + if (end_pfn <= max_low_pfn_mapped + || (end_pfn > (1UL << (32 - PAGE_SHIFT)) + && end_pfn <= max_pfn_mapped)) va = __va(md->phys_addr); else va = efi_ioremap(md->phys_addr, size); |