diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-22 05:44:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:50:14 -0400 |
commit | 1f75d7e32ed47b2ab8570771a2ce8c707a7225a2 (patch) | |
tree | 78a412b060ff869f78e3350fdecc10a53d026846 /arch/x86/mm/init_64.c | |
parent | 17b4cceb1feb2a8865ce47064dd3bd446063a5d5 (diff) |
x86: introduce initmem_init for 64 bit
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 97c2bc741e94..99a091ee5a6a 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -611,6 +611,22 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, unsigned lon | |||
611 | } | 611 | } |
612 | 612 | ||
613 | #ifndef CONFIG_NUMA | 613 | #ifndef CONFIG_NUMA |
614 | void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn) | ||
615 | { | ||
616 | unsigned long bootmap_size, bootmap; | ||
617 | |||
618 | bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; | ||
619 | bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size, | ||
620 | PAGE_SIZE); | ||
621 | if (bootmap == -1L) | ||
622 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); | ||
623 | bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, end_pfn); | ||
624 | e820_register_active_regions(0, start_pfn, end_pfn); | ||
625 | free_bootmem_with_active_regions(0, end_pfn); | ||
626 | early_res_to_bootmem(0, end_pfn<<PAGE_SHIFT); | ||
627 | reserve_bootmem(bootmap, bootmap_size, BOOTMEM_DEFAULT); | ||
628 | } | ||
629 | |||
614 | void __init paging_init(void) | 630 | void __init paging_init(void) |
615 | { | 631 | { |
616 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | 632 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |