提交 80a68a43 编写于 作者: S Stuart Menefy 提交者: Paul Mundt

sh: Add a printk() to warn legacy mem= growers.

mem= can't be used to grow the size of kernel memory, so provide a
warning to that effect.
Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 74d99a5e
......@@ -84,6 +84,17 @@ static int __init early_parse_mem(char *p)
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
size = memparse(p, &p);
if (size > __MEMORY_SIZE) {
static char msg[] __initdata = KERN_ERR
"Using mem= to increase the size of kernel memory "
"is not allowed.\n"
" Recompile the kernel with the correct value for "
"CONFIG_MEMORY_SIZE.\n";
printk(msg);
return 0;
}
memory_end = memory_start + size;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册