powerpc: Fix memory limits when starting at a non-zero address
memblock_enforce_memory_limit() takes the desired maximum quantity of memory to end up with, not an address above which memory will not be used. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
c7704d352d
commit
6dd2270029
@@ -97,7 +97,7 @@ static void __init move_device_tree(void)
|
||||
start = __pa(initial_boot_params);
|
||||
size = be32_to_cpu(initial_boot_params->totalsize);
|
||||
|
||||
if ((memory_limit && (start + size) > memory_limit) ||
|
||||
if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) ||
|
||||
overlaps_crashkernel(start, size)) {
|
||||
p = __va(memblock_alloc(size, PAGE_SIZE));
|
||||
memcpy(p, initial_boot_params, size);
|
||||
|
Reference in New Issue
Block a user