Merge tag 'ntb-5.10' of git://github.com/jonmason/ntb
[linux-2.6-microblaze.git] / arch / sh / mm / init.c
index 4735176..3348e0c 100644 (file)
@@ -226,15 +226,12 @@ void __init allocate_pgdat(unsigned int nid)
 
 static void __init do_init_bootmem(void)
 {
-       struct memblock_region *reg;
+       unsigned long start_pfn, end_pfn;
+       int i;
 
        /* Add active regions with valid PFNs. */
-       for_each_memblock(memory, reg) {
-               unsigned long start_pfn, end_pfn;
-               start_pfn = memblock_region_memory_base_pfn(reg);
-               end_pfn = memblock_region_memory_end_pfn(reg);
+       for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL)
                __add_active_range(0, start_pfn, end_pfn);
-       }
 
        /* All of system RAM sits in node 0 for the non-NUMA case */
        allocate_pgdat(0);