Skip to content

Commit

Permalink
[POWERPC] Fix mem= handling when the memory limit is > RMO size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jul 7, 2006
1 parent 73ea695 commit e7c1f69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/mm/lmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit e7c1f69

Please sign in to comment.