diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-05 21:48:31 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-05 21:48:50 +0100 |
commit | a1413c89ae6a4b7a9a43f7768934a81ffb5c629a (patch) | |
tree | 7e16be26407c5fd4dfbfeb98b11590809a963664 /arch/x86/kernel/efi_64.c | |
parent | f254f3909efaf59ca2d0f408de2d044dace60706 (diff) | |
parent | dd4124a8a06bca89c077a16437edac010f0bb993 (diff) | |
download | kernel_samsung_tuna-a1413c89ae6a4b7a9a43f7768934a81ffb5c629a.zip kernel_samsung_tuna-a1413c89ae6a4b7a9a43f7768934a81ffb5c629a.tar.gz kernel_samsung_tuna-a1413c89ae6a4b7a9a43f7768934a81ffb5c629a.tar.bz2 |
Merge branch 'x86/urgent' into x86/core
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_64.c')
-rw-r--r-- | arch/x86/kernel/efi_64.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/arch/x86/kernel/efi_64.c b/arch/x86/kernel/efi_64.c index a4ee291..22c3b78 100644 --- a/arch/x86/kernel/efi_64.c +++ b/arch/x86/kernel/efi_64.c @@ -100,24 +100,11 @@ void __init efi_call_phys_epilog(void) void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size) { - static unsigned pages_mapped __initdata; - unsigned i, pages; - unsigned long offset; + unsigned long last_map_pfn; - pages = PFN_UP(phys_addr + size) - PFN_DOWN(phys_addr); - offset = phys_addr & ~PAGE_MASK; - phys_addr &= PAGE_MASK; - - if (pages_mapped + pages > MAX_EFI_IO_PAGES) + last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); + if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) return NULL; - for (i = 0; i < pages; i++) { - __set_fixmap(FIX_EFI_IO_MAP_FIRST_PAGE - pages_mapped, - phys_addr, PAGE_KERNEL); - phys_addr += PAGE_SIZE; - pages_mapped++; - } - - return (void __iomem *)__fix_to_virt(FIX_EFI_IO_MAP_FIRST_PAGE - \ - (pages_mapped - pages)) + offset; + return (void __iomem *)__va(phys_addr); } |