powerpc: Replace _ALIGN_UP() by ALIGN()
_ALIGN_UP() is specific to powerpc ALIGN() is generic and does the same Replace _ALIGN_UP() by ALIGN() Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/8a6d7e45f7904c73a0af539642d3962e2a3c7268.1587407777.git.christophe.leroy@c-s.fr
This commit is contained in:

committed by
Michael Ellerman

parent
e96d904ede
commit
b711531641
@@ -1449,18 +1449,18 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
|
||||
unsigned long addr = 0;
|
||||
|
||||
if (align)
|
||||
base = _ALIGN_UP(base, align);
|
||||
base = ALIGN(base, align);
|
||||
prom_debug("%s(%lx, %lx)\n", __func__, size, align);
|
||||
if (ram_top == 0)
|
||||
prom_panic("alloc_up() called with mem not initialized\n");
|
||||
|
||||
if (align)
|
||||
base = _ALIGN_UP(alloc_bottom, align);
|
||||
base = ALIGN(alloc_bottom, align);
|
||||
else
|
||||
base = alloc_bottom;
|
||||
|
||||
for(; (base + size) <= alloc_top;
|
||||
base = _ALIGN_UP(base + 0x100000, align)) {
|
||||
base = ALIGN(base + 0x100000, align)) {
|
||||
prom_debug(" trying: 0x%lx\n\r", base);
|
||||
addr = (unsigned long)prom_claim(base, size, 0);
|
||||
if (addr != PROM_ERROR && addr != 0)
|
||||
@@ -1587,7 +1587,7 @@ static void __init reserve_mem(u64 base, u64 size)
|
||||
* dumb and just copy this entire array to the boot params
|
||||
*/
|
||||
base = ALIGN_DOWN(base, PAGE_SIZE);
|
||||
top = _ALIGN_UP(top, PAGE_SIZE);
|
||||
top = ALIGN(top, PAGE_SIZE);
|
||||
size = top - base;
|
||||
|
||||
if (cnt >= (MEM_RESERVE_MAP_SIZE - 1))
|
||||
|
Reference in New Issue
Block a user