aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorStuart Menefy <stuart.menefy@st.com>2007-11-26 21:16:09 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-01-28 13:18:57 +0900
commit80a68a43d90e2221599b507b6b26c3cba1957687 (patch)
tree476d0eb75ed22801381bd2bcc611d9320e78a7eb /arch
parent74d99a5e262229ee865f6f68528d10b82471ead6 (diff)
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: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/setup.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 6891cc93548..7eb7fdcce0f 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -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;