summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman2006-07-04 09:13:23 +0200
committerPaul Mackerras2006-07-07 12:19:16 +0200
commite7c1f69d4fa4da47dc995b5de64b6cb76ae32081 (patch)
treef28032f439eb7a0a667eb6ac969b008e3e317f2e /arch/powerpc
parent[POWERPC] More offb/bootx fixes (diff)
downloadkernel-qcow2-linux-e7c1f69d4fa4da47dc995b5de64b6cb76ae32081.tar.gz
kernel-qcow2-linux-e7c1f69d4fa4da47dc995b5de64b6cb76ae32081.tar.xz
kernel-qcow2-linux-e7c1f69d4fa4da47dc995b5de64b6cb76ae32081.zip
[POWERPC] Fix mem= handling when the memory limit is > RMO size
There's a bug in my cleaned up mem= handling, if the memory limit is larger than the RMO size we'll erroneously enlarge the RMO size. Fix is to only change the RMO size if the memory limit is less than the current RMO value. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/lmb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 4b17a7359924..716a2906a24d 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -320,7 +320,8 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit)
break;
}
- lmb.rmo_size = lmb.memory.region[0].size;
+ if (lmb.memory.region[0].size < lmb.rmo_size)
+ lmb.rmo_size = lmb.memory.region[0].size;
/* And truncate any reserves above the limit also. */
for (i = 0; i < lmb.reserved.cnt; i++) {