aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/lmb.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-07-04 03:13:23 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-25 11:28:24 -0400
commit30f30e13055d1e018c70d2b1b3ff86f8c25c511b (patch)
treecf452ba456760b40b0e3418a363b6e5b40eba6a6 /arch/powerpc/mm/lmb.c
parent98c82472e98469ef23d7c680a0d6be1429540166 (diff)
[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/mm/lmb.c')
-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)
320 break; 320 break;
321 } 321 }
322 322
323 lmb.rmo_size = lmb.memory.region[0].size; 323 if (lmb.memory.region[0].size < lmb.rmo_size)
324 lmb.rmo_size = lmb.memory.region[0].size;
324 325
325 /* And truncate any reserves above the limit also. */ 326 /* And truncate any reserves above the limit also. */
326 for (i = 0; i < lmb.reserved.cnt; i++) { 327 for (i = 0; i < lmb.reserved.cnt; i++) {