arm64: numa: simplify dummy_numa_init()
[linux-2.6-microblaze.git] / arch / arm64 / mm / numa.c
index 676deb2..2040b97 100644 (file)
@@ -427,19 +427,16 @@ out_free_distance:
  */
 static int __init dummy_numa_init(void)
 {
+       phys_addr_t start = memblock_start_of_DRAM();
+       phys_addr_t end = memblock_end_of_DRAM();
        int ret;
-       struct memblock_region *mblk;
 
        if (numa_off)
                pr_info("NUMA disabled\n"); /* Forced off on command line. */
-       pr_info("Faking a node at [mem %#018Lx-%#018Lx]\n",
-               memblock_start_of_DRAM(), memblock_end_of_DRAM() - 1);
-
-       for_each_memblock(memory, mblk) {
-               ret = numa_add_memblk(0, mblk->base, mblk->base + mblk->size);
-               if (!ret)
-                       continue;
+       pr_info("Faking a node at [mem %#018Lx-%#018Lx]\n", start, end - 1);
 
+       ret = numa_add_memblk(0, start, end);
+       if (ret) {
                pr_err("NUMA init failed\n");
                return ret;
        }