diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-05-17 18:00:45 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-19 15:02:13 +1000 |
commit | 846f77b08c8301682ded5ce127c56397327a60d0 (patch) | |
tree | c155737af3eceab34c621cc6930145062323eef8 /arch/powerpc/kernel/setup_32.c | |
parent | 480f6f35a149802a94ad5c1a2673ed6ec8d2c158 (diff) | |
download | blackbird-op-linux-846f77b08c8301682ded5ce127c56397327a60d0.tar.gz blackbird-op-linux-846f77b08c8301682ded5ce127c56397327a60d0.zip |
[PATCH] powerpc: Parse early parameters earlier
Currently we have call parse_early_param() earliyish, but not really very
early. In particular, it's not early enough to do things like mem=x or
crashkernel=blah, which is annoying.
So do it earlier. I've checked all the early param handlers, and none of them
look like they should have any trouble with this. I haven't tested the
booke_wdt ones though.
On 32-bit we were doing the CONFIG_CMDLINE logic twice, so don't.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 2b6cacb6946f..e5a44812441a 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -131,12 +131,6 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys) /* Do some early initialization based on the flat device tree */ early_init_devtree(__va(dt_ptr)); - /* Check default command line */ -#ifdef CONFIG_CMDLINE - if (cmd_line[0] == 0) - strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); -#endif /* CONFIG_CMDLINE */ - probe_machine(); #ifdef CONFIG_6xx @@ -235,6 +229,8 @@ arch_initcall(ppc_init); /* Warning, IO base is not yet inited */ void __init setup_arch(char **cmdline_p) { + *cmdline_p = cmd_line; + /* so udelay does something sensible, assume <= 1000 bogomips */ loops_per_jiffy = 500000000 / HZ; @@ -291,12 +287,6 @@ void __init setup_arch(char **cmdline_p) init_mm.end_data = (unsigned long) _edata; init_mm.brk = klimit; - /* Save unparsed command line copy for /proc/cmdline */ - strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); - *cmdline_p = cmd_line; - - parse_early_param(); - if (do_early_xmon) debugger(NULL); |