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>
This commit is contained in:
parent
16f393df49
commit
7e5186eaae
|
@ -88,8 +88,7 @@ static struct resource data_resource = { .name = "Kernel data", };
|
||||||
|
|
||||||
unsigned long memory_start;
|
unsigned long memory_start;
|
||||||
EXPORT_SYMBOL(memory_start);
|
EXPORT_SYMBOL(memory_start);
|
||||||
|
unsigned long memory_end = 0;
|
||||||
unsigned long memory_end;
|
|
||||||
EXPORT_SYMBOL(memory_end);
|
EXPORT_SYMBOL(memory_end);
|
||||||
|
|
||||||
static int __init early_parse_mem(char *p)
|
static int __init early_parse_mem(char *p)
|
||||||
|
@ -265,6 +264,7 @@ void __init setup_arch(char **cmdline_p)
|
||||||
data_resource.end = virt_to_phys(_edata)-1;
|
data_resource.end = virt_to_phys(_edata)-1;
|
||||||
|
|
||||||
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
|
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
|
||||||
|
if (!memory_end)
|
||||||
memory_end = memory_start + __MEMORY_SIZE;
|
memory_end = memory_start + __MEMORY_SIZE;
|
||||||
|
|
||||||
#ifdef CONFIG_CMDLINE_BOOL
|
#ifdef CONFIG_CMDLINE_BOOL
|
||||||
|
|
Loading…
Reference in New Issue