aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-04-09 06:48:04 -0400
committerVineet Gupta <vgupta@synopsys.com>2013-05-07 04:13:57 -0400
commit9593a933d538a726b341cb06b3362d74931aa281 (patch)
tree1a4addd683e8e7a7f88eefa4c2a49382a23192ab /arch/arc
parent6971881f2ae0e0208375dc40e1a9a4ce56f7c9d6 (diff)
ARC: [cmdline] Don't overwrite u-boot provided bootargs
The existing code was wrong on several counts: * uboot provided bootargs were copied into @boot_command_line, only to be over-written by setup_machine_fdt(), effectively lost * @cmdline_p returned by setup_arch() to start_kernel() didn't include the DT /bootargs Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/kernel/setup.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index 18763153e07c..b2b3731dd1e9 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -318,18 +318,20 @@ void __cpuinit setup_processor(void)
318 318
319void __init setup_arch(char **cmdline_p) 319void __init setup_arch(char **cmdline_p)
320{ 320{
321 /* This also populates @boot_command_line from /bootargs */
322 machine_desc = setup_machine_fdt(__dtb_start);
323 if (!machine_desc)
324 panic("Embedded DT invalid\n");
325
326 /* Append any u-boot provided cmdline */
321#ifdef CONFIG_CMDLINE_UBOOT 327#ifdef CONFIG_CMDLINE_UBOOT
322 /* Make sure that a whitespace is inserted before */ 328 /* Add a whitespace seperator between the 2 cmdlines */
323 strlcat(command_line, " ", sizeof(command_line)); 329 strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
330 strlcat(boot_command_line, command_line, COMMAND_LINE_SIZE);
324#endif 331#endif
325 332
326 /* Save unparsed command line copy for /proc/cmdline */ 333 /* Save unparsed command line copy for /proc/cmdline */
327 strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 334 *cmdline_p = boot_command_line;
328 *cmdline_p = command_line;
329
330 machine_desc = setup_machine_fdt(__dtb_start);
331 if (!machine_desc)
332 panic("Embedded DT invalid\n");
333 335
334 /* To force early parsing of things like mem=xxx */ 336 /* To force early parsing of things like mem=xxx */
335 parse_early_param(); 337 parse_early_param();