diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2007-11-26 07:16:09 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:57 -0500 |
commit | 80a68a43d90e2221599b507b6b26c3cba1957687 (patch) | |
tree | 476d0eb75ed22801381bd2bcc611d9320e78a7eb /arch/sh | |
parent | 74d99a5e262229ee865f6f68528d10b82471ead6 (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/sh')
-rw-r--r-- | arch/sh/kernel/setup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 6891cc93548e..7eb7fdcce0f8 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) | |||
84 | 84 | ||
85 | memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; | 85 | memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; |
86 | size = memparse(p, &p); | 86 | size = memparse(p, &p); |
87 | |||
88 | if (size > __MEMORY_SIZE) { | ||
89 | static char msg[] __initdata = KERN_ERR | ||
90 | "Using mem= to increase the size of kernel memory " | ||
91 | "is not allowed.\n" | ||
92 | " Recompile the kernel with the correct value for " | ||
93 | "CONFIG_MEMORY_SIZE.\n"; | ||
94 | printk(msg); | ||
95 | return 0; | ||
96 | } | ||
97 | |||
87 | memory_end = memory_start + size; | 98 | memory_end = memory_start + size; |
88 | 99 | ||
89 | return 0; | 100 | return 0; |