openrisc: prefer memblock APIs returning virtual address
[linux-2.6-microblaze.git] / arch / openrisc / mm / init.c
index d157310..caeb418 100644 (file)
@@ -105,7 +105,10 @@ static void __init map_ram(void)
                        }
 
                        /* Alloc one page for holding PTE's... */
-                       pte = (pte_t *) __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE));
+                       pte = memblock_alloc_raw(PAGE_SIZE, PAGE_SIZE);
+                       if (!pte)
+                               panic("%s: Failed to allocate page for PTEs\n",
+                                     __func__);
                        set_pmd(pme, __pmd(_KERNPG_TABLE + __pa(pte)));
 
                        /* Fill the newly allocated page with PTE'S */