aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/init_64.c16
-rw-r--r--arch/x86/mm/numa_64.c2
-rw-r--r--include/asm-x86/numa_64.h1
-rw-r--r--include/asm-x86/page_64.h1
4 files changed, 18 insertions, 2 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
614void __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
614void __init paging_init(void) 630void __init paging_init(void)
615{ 631{
616 unsigned long max_zone_pfns[MAX_NR_ZONES]; 632 unsigned long max_zone_pfns[MAX_NR_ZONES];
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index c4557e25f60c..316e5f961ef0 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -514,7 +514,7 @@ out:
514} 514}
515#endif /* CONFIG_NUMA_EMU */ 515#endif /* CONFIG_NUMA_EMU */
516 516
517void __init numa_initmem_init(unsigned long start_pfn, unsigned long last_pfn) 517void __init initmem_init(unsigned long start_pfn, unsigned long last_pfn)
518{ 518{
519 int i; 519 int i;
520 520
diff --git a/include/asm-x86/numa_64.h b/include/asm-x86/numa_64.h
index b510daf4f4d8..3830094434a9 100644
--- a/include/asm-x86/numa_64.h
+++ b/include/asm-x86/numa_64.h
@@ -22,7 +22,6 @@ extern int hotadd_percent;
22 22
23extern s16 apicid_to_node[MAX_LOCAL_APIC]; 23extern s16 apicid_to_node[MAX_LOCAL_APIC];
24 24
25extern void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn);
26extern unsigned long numa_free_all_bootmem(void); 25extern unsigned long numa_free_all_bootmem(void);
27extern void setup_node_bootmem(int nodeid, unsigned long start, 26extern void setup_node_bootmem(int nodeid, unsigned long start,
28 unsigned long end); 27 unsigned long end);
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h
index 6ea72859c491..ac37643078e7 100644
--- a/include/asm-x86/page_64.h
+++ b/include/asm-x86/page_64.h
@@ -83,6 +83,7 @@ typedef struct { pteval_t pte; } pte_t;
83extern unsigned long init_memory_mapping(unsigned long start, 83extern unsigned long init_memory_mapping(unsigned long start,
84 unsigned long end); 84 unsigned long end);
85 85
86extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
86#endif /* !__ASSEMBLY__ */ 87#endif /* !__ASSEMBLY__ */
87 88
88#ifdef CONFIG_FLATMEM 89#ifdef CONFIG_FLATMEM