diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-08-25 20:39:17 (GMT) |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-08-27 18:13:47 (GMT) |
commit | a9ce6bc15100023b411f8117e53a016d61889800 (patch) | |
tree | c9cb1468fde867fd9bfeb0cb33ffe994b0720aaa /arch/x86/mm/init_64.c | |
parent | 72d7c3b33c980843e756681fb4867dc1efd62a76 (diff) | |
download | linux-fsl-qoriq-a9ce6bc15100023b411f8117e53a016d61889800.tar.xz |
x86, memblock: Replace e820_/_early string with memblock_
1.include linux/memblock.h directly. so later could reduce e820.h reference.
2 this patch is done by sed scripts mainly
-v2: use MEMBLOCK_ERROR instead of -1ULL or -1UL
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 634fa08..592b236 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -21,6 +21,7 @@ #include <linux/initrd.h> #include <linux/pagemap.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/proc_fs.h> #include <linux/pci.h> #include <linux/pfn.h> @@ -577,18 +578,18 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn, unsigned long bootmap_size, bootmap; bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; - bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size, + bootmap = memblock_find_in_range(0, end_pfn<<PAGE_SHIFT, bootmap_size, PAGE_SIZE); - if (bootmap == -1L) + if (bootmap == MEMBLOCK_ERROR) panic("Cannot find bootmem map of size %ld\n", bootmap_size); - reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP"); + memblock_x86_reserve_range(bootmap, bootmap + bootmap_size, "BOOTMAP"); /* don't touch min_low_pfn */ bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT, 0, end_pfn); - e820_register_active_regions(0, start_pfn, end_pfn); + memblock_x86_register_active_regions(0, start_pfn, end_pfn); free_bootmem_with_active_regions(0, end_pfn); #else - e820_register_active_regions(0, start_pfn, end_pfn); + memblock_x86_register_active_regions(0, start_pfn, end_pfn); #endif } #endif |