Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~shefty/rdma-dev.git] / arch / sparc / mm / init_64.c
index 82bbf04..5c2c6e6 100644 (file)
@@ -2027,6 +2027,16 @@ static void __init patch_tlb_miss_handler_bitmap(void)
        flushi(&valid_addr_bitmap_insn[0]);
 }
 
+static void __init register_page_bootmem_info(void)
+{
+#ifdef CONFIG_NEED_MULTIPLE_NODES
+       int i;
+
+       for_each_online_node(i)
+               if (NODE_DATA(i)->node_spanned_pages)
+                       register_page_bootmem_info_node(NODE_DATA(i));
+#endif
+}
 void __init mem_init(void)
 {
        unsigned long codepages, datapages, initpages;
@@ -2044,20 +2054,8 @@ void __init mem_init(void)
 
        high_memory = __va(last_valid_pfn << PAGE_SHIFT);
 
-#ifdef CONFIG_NEED_MULTIPLE_NODES
-       {
-               int i;
-               for_each_online_node(i) {
-                       if (NODE_DATA(i)->node_spanned_pages != 0) {
-                               totalram_pages +=
-                                       free_all_bootmem_node(NODE_DATA(i));
-                       }
-               }
-               totalram_pages += free_low_memory_core_early(MAX_NUMNODES);
-       }
-#else
+       register_page_bootmem_info();
        totalram_pages = free_all_bootmem();
-#endif
 
        /* We subtract one to account for the mem_map_zero page
         * allocated below.