aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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;