diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-10-30 04:18:08 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-10-30 04:18:08 -0400 |
commit | 7e5186eaae8eebc0101d539791dbff92256455ee (patch) | |
tree | a09dc7463aa63865126af3f84d29e245a7bec3a1 /arch/sh/kernel | |
parent | 16f393df496cfe74f7a26a1ba85e41fd818c0582 (diff) |
sh: Fix up early mem cmdline parsing.
memory_end was being clobbered by whatever the kernel config had
specified, rather than obeying the setup option. Fix this up so
that memory_end is only initialized if nothing has been set on
the command line.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/setup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index b749403f6b38..a031c6773906 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -88,8 +88,7 @@ static struct resource data_resource = { .name = "Kernel data", }; | |||
88 | 88 | ||
89 | unsigned long memory_start; | 89 | unsigned long memory_start; |
90 | EXPORT_SYMBOL(memory_start); | 90 | EXPORT_SYMBOL(memory_start); |
91 | 91 | unsigned long memory_end = 0; | |
92 | unsigned long memory_end; | ||
93 | EXPORT_SYMBOL(memory_end); | 92 | EXPORT_SYMBOL(memory_end); |
94 | 93 | ||
95 | static int __init early_parse_mem(char *p) | 94 | static int __init early_parse_mem(char *p) |
@@ -265,7 +264,8 @@ void __init setup_arch(char **cmdline_p) | |||
265 | data_resource.end = virt_to_phys(_edata)-1; | 264 | data_resource.end = virt_to_phys(_edata)-1; |
266 | 265 | ||
267 | memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; | 266 | memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; |
268 | memory_end = memory_start + __MEMORY_SIZE; | 267 | if (!memory_end) |
268 | memory_end = memory_start + __MEMORY_SIZE; | ||
269 | 269 | ||
270 | #ifdef CONFIG_CMDLINE_BOOL | 270 | #ifdef CONFIG_CMDLINE_BOOL |
271 | strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); | 271 | strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); |