summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2011-01-27 11:30:44 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-02 06:56:15 +0100
commit6dd227002972be910c6191f38f8641e01796557f (patch)
tree2dbfe9ef7a95c0f95ea4938a9fa60d9e65c23165 /arch/powerpc/kernel/prom.c
parentpowerpc/pseries: Reduce HVCS driver insanity (diff)
downloadlinux-6dd227002972be910c6191f38f8641e01796557f.tar.xz
linux-6dd227002972be910c6191f38f8641e01796557f.zip
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>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 7185f0da7dc3..05b7139d6a27 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -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);