aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-11-16 22:39:21 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-17 14:59:48 -0500
commit961f8fa04b1c3dfe35c2d3ee7ccba28f9b0e0e09 (patch)
tree50999cf8888284997d6b8489ae2ab41c815bc374 /arch/sparc
parentc074eaac2ab264c94520efff7e896b771de885ae (diff)
sparc, mm: Remove calling of free_all_bootmem_node()
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 calling of free_all_bootmem_node() We add register_page_bootmem_info() to call register_page_bootmem_info_node directly. Also could use free_all_bootmem() for numa case, and it is just the same as free_low_memory_core_early(). Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1353123563-3103-45-git-send-email-yinghai@kernel.org Cc: "David S. Miller" <davem@davemloft.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: sparclinux@vger.kernel.org Acked-by: "David S. Miller" <davem@davemloft.net> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/mm/init_64.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 9e28a118e6a4..b24bac238e34 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2021,6 +2021,16 @@ static void __init patch_tlb_miss_handler_bitmap(void)
2021 flushi(&valid_addr_bitmap_insn[0]); 2021 flushi(&valid_addr_bitmap_insn[0]);
2022} 2022}
2023 2023
2024static void __init register_page_bootmem_info(void)
2025{
2026#ifdef CONFIG_NEED_MULTIPLE_NODES
2027 int i;
2028
2029 for_each_online_node(i)
2030 if (NODE_DATA(i)->node_spanned_pages)
2031 register_page_bootmem_info_node(NODE_DATA(i));
2032#endif
2033}
2024void __init mem_init(void) 2034void __init mem_init(void)
2025{ 2035{
2026 unsigned long codepages, datapages, initpages; 2036 unsigned long codepages, datapages, initpages;
@@ -2038,20 +2048,8 @@ void __init mem_init(void)
2038 2048
2039 high_memory = __va(last_valid_pfn << PAGE_SHIFT); 2049 high_memory = __va(last_valid_pfn << PAGE_SHIFT);
2040 2050
2041#ifdef CONFIG_NEED_MULTIPLE_NODES 2051 register_page_bootmem_info();
2042 {
2043 int i;
2044 for_each_online_node(i) {
2045 if (NODE_DATA(i)->node_spanned_pages != 0) {
2046 totalram_pages +=
2047 free_all_bootmem_node(NODE_DATA(i));
2048 }
2049 }
2050 totalram_pages += free_low_memory_core_early(MAX_NUMNODES);
2051 }
2052#else
2053 totalram_pages = free_all_bootmem(); 2052 totalram_pages = free_all_bootmem();
2054#endif
2055 2053
2056 /* We subtract one to account for the mem_map_zero page 2054 /* We subtract one to account for the mem_map_zero page
2057 * allocated below. 2055 * allocated below.