浏览代码

[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>
Michael Ellerman 19 年之前
父节点
当前提交
30f30e1305
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/powerpc/mm/lmb.c

+ 2 - 1
arch/powerpc/mm/lmb.c

@@ -320,7 +320,8 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit)
 		break;
 		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. */
 	/* And truncate any reserves above the limit also. */
 	for (i = 0; i < lmb.reserved.cnt; i++) {
 	for (i = 0; i < lmb.reserved.cnt; i++) {