Re: [RFC 7/8] Call early_param earlier.

From: Rusty Russell
Date: Wed Dec 03 2008 - 18:47:40 EST


On Thursday 04 December 2008 00:14:10 David Howells wrote:
> Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
> > parse_args("Core params", boot_command_line, __start___core_param,
> > __stop___core_param - __start___core_param,
> > unknown_core_ok, true);
> > + /* All fall through to do_early_param. */
> > + parse_args("early options", boot_command_line, NULL, 0, do_early_param,
> > + true);
>
> Why have two separate lists since they are processed contiguously?

You're right. I don't think we care about people who have early_param of same
name as core_param; they deserve horrible death anyway.

param: combine core_param and early_param parsing.

David Howells points out that we can now do early_param and core_param
in a single pass of parse_args.

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
---
init/main.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/init/main.c b/init/main.c
--- a/init/main.c
+++ b/init/main.c
@@ -548,12 +548,10 @@ asmlinkage void __init start_kernel(void
asmlinkage void __init start_kernel(void)
{
arch_get_boot_command_line();
- parse_args("Core params", boot_command_line, __start___core_param,
+ parse_args("Core and early params", boot_command_line,
+ __start___core_param,
__stop___core_param - __start___core_param,
- unknown_core_ok, true);
- /* All fall through to do_early_param. */
- parse_args("early options", boot_command_line, NULL, 0, do_early_param,
- true);
+ do_early_param, true);

smp_setup_processor_id();


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/