diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-08-25 16:39:17 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-08-27 14:13:47 -0400 |
commit | a9ce6bc15100023b411f8117e53a016d61889800 (patch) | |
tree | c9cb1468fde867fd9bfeb0cb33ffe994b0720aaa /arch/x86/mm/init_64.c | |
parent | 72d7c3b33c980843e756681fb4867dc1efd62a76 (diff) |
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 634fa0884a41..592b2368062d 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/initrd.h> | 21 | #include <linux/initrd.h> |
22 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/memblock.h> | ||
24 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
25 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
26 | #include <linux/pfn.h> | 27 | #include <linux/pfn.h> |
@@ -577,18 +578,18 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn, | |||
577 | unsigned long bootmap_size, bootmap; | 578 | unsigned long bootmap_size, bootmap; |
578 | 579 | ||
579 | bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; | 580 | bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; |
580 | bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size, | 581 | bootmap = memblock_find_in_range(0, end_pfn<<PAGE_SHIFT, bootmap_size, |
581 | PAGE_SIZE); | 582 | PAGE_SIZE); |
582 | if (bootmap == -1L) | 583 | if (bootmap == MEMBLOCK_ERROR) |
583 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); | 584 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); |
584 | reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP"); | 585 | memblock_x86_reserve_range(bootmap, bootmap + bootmap_size, "BOOTMAP"); |
585 | /* don't touch min_low_pfn */ | 586 | /* don't touch min_low_pfn */ |
586 | bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT, | 587 | bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT, |
587 | 0, end_pfn); | 588 | 0, end_pfn); |
588 | e820_register_active_regions(0, start_pfn, end_pfn); | 589 | memblock_x86_register_active_regions(0, start_pfn, end_pfn); |
589 | free_bootmem_with_active_regions(0, end_pfn); | 590 | free_bootmem_with_active_regions(0, end_pfn); |
590 | #else | 591 | #else |
591 | e820_register_active_regions(0, start_pfn, end_pfn); | 592 | memblock_x86_register_active_regions(0, start_pfn, end_pfn); |
592 | #endif | 593 | #endif |
593 | } | 594 | } |
594 | #endif | 595 | #endif |