h8300, nds32, openrisc: simplify detection of memory extents
[linux-2.6-microblaze.git] / arch / h8300 / kernel / setup.c
index 28ac883..0281f92 100644 (file)
@@ -74,17 +74,15 @@ static void __init bootmem_init(void)
        memory_end = memory_start = 0;
 
        /* Find main memory where is the kernel */
-       for_each_memblock(memory, region) {
-               memory_start = region->base;
-               memory_end = region->base + region->size;
-       }
+       memory_start = memblock_start_of_DRAM();
+       memory_end = memblock_end_of_DRAM();
 
        if (!memory_end)
                panic("No memory!");
 
        /* setup bootmem globals (we use no_bootmem, but mm still depends on this) */
        min_low_pfn = PFN_UP(memory_start);
-       max_low_pfn = PFN_DOWN(memblock_end_of_DRAM());
+       max_low_pfn = PFN_DOWN(memory_end);
        max_pfn = max_low_pfn;
 
        memblock_reserve(__pa(_stext), _end - _stext);