Re: [RFC 5/8] param: arch_get_boot_command_line()

From: Rusty Russell
Date: Tue Dec 02 2008 - 21:31:07 EST


On Tuesday 02 December 2008 19:53:30 Haavard Skinnemoen wrote:
> I think avr32 might need something similar as it also gets the command
> line from a tag list. But we never really do anything tricky with those
> tags, so I think it should work to simply move the call to parse_tags()
> from setup_arch() into arch_get_boot_command_line().

Good point, here's my new avr32 part (untested):

diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -39,8 +39,6 @@ struct avr32_cpuinfo boot_cpu_data = {
.loops_per_jiffy = 5000000
};
EXPORT_SYMBOL(boot_cpu_data);
-
-static char __initdata command_line[COMMAND_LINE_SIZE];

/*
* Standard memory resources
@@ -536,7 +534,12 @@ static void __init setup_bootmem(void)
}
}

-void __init setup_arch (char **cmdline_p)
+void __init arch_get_boot_command_line(void)
+{
+ parse_tags(bootloader_tags);
+}
+
+void __init setup_arch(void)
{
struct clk *cpu_clk;

@@ -553,8 +556,6 @@ void __init setup_arch (char **cmdline_p
kernel_code.end = __pa(init_mm.end_code - 1);
kernel_data.start = __pa(init_mm.end_code);
kernel_data.end = __pa(init_mm.brk - 1);
-
- parse_tags(bootloader_tags);

setup_processor();
setup_platform();
@@ -579,8 +580,6 @@ void __init setup_arch (char **cmdline_p
((cpu_hz + 500) / 1000) % 1000);
}

- strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
- *cmdline_p = command_line;
parse_early_param();

setup_bootmem();

--
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/