unsigned long size = 0x200 + VECTORSPACING*64;
phys_addr_t ebase_pa;
- ebase = (unsigned long)
- memblock_alloc(size, 1 << fls(size));
- if (!ebase)
+ ebase_pa = memblock_phys_alloc(size, 1 << fls(size));
+ if (!ebase_pa)
panic("%s: Failed to allocate %lu bytes align=0x%x\n",
__func__, size, 1 << fls(size));
* EVA is special though as it allows segments to be rearranged
* and to become uncached during cache error handling.
*/
- ebase_pa = __pa(ebase);
if (!IS_ENABLED(CONFIG_EVA) && !WARN_ON(ebase_pa >= 0x20000000))
ebase = CKSEG0ADDR(ebase_pa);
+ else
+ ebase = (unsigned long)phys_to_virt(ebase_pa);
} else {
ebase = CAC_BASE;