Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7c1f69d authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras
Browse files

[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: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 73ea6959
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -320,6 +320,7 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit)
		break;
	}

	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. */