From: Michael Ellerman Date: Tue, 4 Jul 2006 07:13:23 +0000 (+1000) Subject: [POWERPC] Fix mem= handling when the memory limit is > RMO size X-Git-Tag: upstream/snapshot3+hdmi~38362^2~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7c1f69d4fa4da47dc995b5de64b6cb76ae32081;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 4b17a73..716a290 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++) {