]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[POWERPC] Fix mem= handling when the memory limit is > RMO size
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 4 Jul 2006 07:13:23 +0000 (17:13 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 7 Jul 2006 10:19:16 +0000 (20:19 +1000)
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>
arch/powerpc/mm/lmb.c

index 4b17a7359924ef5e339753194a25ab5a2b59254f..716a2906a24da373a9e892e1486e24f1316d271e 100644 (file)
@@ -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++) {