diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-13 02:14:25 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 02:14:25 +0100 |
commit | 25d500067d5a666d1336598d1b324793554e5496 (patch) | |
tree | 3402308c4c69a66d02ce55f5c165e242fad2a8a9 /arch/x86/kernel/efi_64.c | |
parent | 0b13fda1e0936b3d64c4c407f183d33fa6bd2ad4 (diff) | |
parent | 9ead64974b05501bbac0d63a47c99fa786d064ba (diff) |
Merge branch 'linus' into core/ipi
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 652c5287215..cb783b92c50 100644 --- a/arch/x86/kernel/efi_64.c +++ b/arch/x86/kernel/efi_64.c @@ -99,24 +99,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); } |