mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[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>
This commit is contained in:
parent
98c82472e9
commit
30f30e1305
1 changed files with 2 additions and 1 deletions
|
@ -320,6 +320,7 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lmb.memory.region[0].size < lmb.rmo_size)
|
||||||
lmb.rmo_size = lmb.memory.region[0].size;
|
lmb.rmo_size = lmb.memory.region[0].size;
|
||||||
|
|
||||||
/* And truncate any reserves above the limit also. */
|
/* And truncate any reserves above the limit also. */
|
||||||
|
|
Loading…
Reference in a new issue