diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-05-17 04:00:45 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-19 01:02:13 -0400 |
commit | 846f77b08c8301682ded5ce127c56397327a60d0 (patch) | |
tree | c155737af3eceab34c621cc6930145062323eef8 /arch/powerpc/kernel/setup_32.c | |
parent | 480f6f35a149802a94ad5c1a2673ed6ec8d2c158 (diff) |
[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) | |||
131 | /* Do some early initialization based on the flat device tree */ | 131 | /* Do some early initialization based on the flat device tree */ |
132 | early_init_devtree(__va(dt_ptr)); | 132 | early_init_devtree(__va(dt_ptr)); |
133 | 133 | ||
134 | /* Check default command line */ | ||
135 | #ifdef CONFIG_CMDLINE | ||
136 | if (cmd_line[0] == 0) | ||
137 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); | ||
138 | #endif /* CONFIG_CMDLINE */ | ||
139 | |||
140 | probe_machine(); | 134 | probe_machine(); |
141 | 135 | ||
142 | #ifdef CONFIG_6xx | 136 | #ifdef CONFIG_6xx |
@@ -235,6 +229,8 @@ arch_initcall(ppc_init); | |||
235 | /* Warning, IO base is not yet inited */ | 229 | /* Warning, IO base is not yet inited */ |
236 | void __init setup_arch(char **cmdline_p) | 230 | void __init setup_arch(char **cmdline_p) |
237 | { | 231 | { |
232 | *cmdline_p = cmd_line; | ||
233 | |||
238 | /* so udelay does something sensible, assume <= 1000 bogomips */ | 234 | /* so udelay does something sensible, assume <= 1000 bogomips */ |
239 | loops_per_jiffy = 500000000 / HZ; | 235 | loops_per_jiffy = 500000000 / HZ; |
240 | 236 | ||
@@ -291,12 +287,6 @@ void __init setup_arch(char **cmdline_p) | |||
291 | init_mm.end_data = (unsigned long) _edata; | 287 | init_mm.end_data = (unsigned long) _edata; |
292 | init_mm.brk = klimit; | 288 | init_mm.brk = klimit; |
293 | 289 | ||
294 | /* Save unparsed command line copy for /proc/cmdline */ | ||
295 | strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); | ||
296 | *cmdline_p = cmd_line; | ||
297 | |||
298 | parse_early_param(); | ||
299 | |||
300 | if (do_early_xmon) | 290 | if (do_early_xmon) |
301 | debugger(NULL); | 291 | debugger(NULL); |
302 | 292 | ||