aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-11-16 22:39:19 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-17 14:59:47 -0500
commit94b43c3d86dddf95064fc83e9087448b35f985ff (patch)
tree5019906f1e5ecdb581f66ba4958eb1ad4c2f9144 /arch/x86/mm
parentb8fd39c036ab982aa087b7ee671f86e2574d31f2 (diff)
x86, mm: kill numa_free_all_bootmem()
Now NO_BOOTMEM version free_all_bootmem_node() does not really do free_bootmem at all, and it only call register_page_bootmem_info_node instead. That is confusing, try to kill that free_all_bootmem_node(). Before that, this patch will remove numa_free_all_bootmem(). That function could be replaced with register_page_bootmem_info() and free_all_bootmem(); Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1353123563-3103-43-git-send-email-yinghai@kernel.org Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/init_64.c15
-rw-r--r--arch/x86/mm/numa_64.c13
2 files changed, 11 insertions, 17 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 1d53defc99c9..41785305f645 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -629,6 +629,16 @@ EXPORT_SYMBOL_GPL(arch_add_memory);
629 629
630static struct kcore_list kcore_vsyscall; 630static struct kcore_list kcore_vsyscall;
631 631
632static void __init register_page_bootmem_info(void)
633{
634#ifdef CONFIG_NUMA
635 int i;
636
637 for_each_online_node(i)
638 register_page_bootmem_info_node(NODE_DATA(i));
639#endif
640}
641
632void __init mem_init(void) 642void __init mem_init(void)
633{ 643{
634 long codesize, reservedpages, datasize, initsize; 644 long codesize, reservedpages, datasize, initsize;
@@ -641,11 +651,8 @@ void __init mem_init(void)
641 reservedpages = 0; 651 reservedpages = 0;
642 652
643 /* this will put all low memory onto the freelists */ 653 /* this will put all low memory onto the freelists */
644#ifdef CONFIG_NUMA 654 register_page_bootmem_info();
645 totalram_pages = numa_free_all_bootmem();
646#else
647 totalram_pages = free_all_bootmem(); 655 totalram_pages = free_all_bootmem();
648#endif
649 656
650 absent_pages = absent_pages_in_range(0, max_pfn); 657 absent_pages = absent_pages_in_range(0, max_pfn);
651 reservedpages = max_pfn - totalram_pages - absent_pages; 658 reservedpages = max_pfn - totalram_pages - absent_pages;
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 92e27119ee1a..9405ffc91502 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -10,16 +10,3 @@ void __init initmem_init(void)
10{ 10{
11 x86_numa_init(); 11 x86_numa_init();
12} 12}
13
14unsigned long __init numa_free_all_bootmem(void)
15{
16 unsigned long pages = 0;
17 int i;
18
19 for_each_online_node(i)
20 pages += free_all_bootmem_node(NODE_DATA(i));
21
22 pages += free_low_memory_core_early(MAX_NUMNODES);
23
24 return pages;
25}