diff options
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r-- | arch/mips/kernel/setup.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index bd55f71055ba..f9513f9e61d3 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -58,8 +58,12 @@ EXPORT_SYMBOL(mips_machtype); | |||
58 | 58 | ||
59 | struct boot_mem_map boot_mem_map; | 59 | struct boot_mem_map boot_mem_map; |
60 | 60 | ||
61 | static char command_line[COMMAND_LINE_SIZE]; | 61 | static char __initdata command_line[COMMAND_LINE_SIZE]; |
62 | char arcs_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; | 62 | char __initdata arcs_cmdline[COMMAND_LINE_SIZE]; |
63 | |||
64 | #ifdef CONFIG_CMDLINE_BOOL | ||
65 | static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; | ||
66 | #endif | ||
63 | 67 | ||
64 | /* | 68 | /* |
65 | * mips_io_port_base is the begin of the address space to which x86 style | 69 | * mips_io_port_base is the begin of the address space to which x86 style |
@@ -458,8 +462,20 @@ static void __init arch_mem_init(char **cmdline_p) | |||
458 | pr_info("Determined physical RAM map:\n"); | 462 | pr_info("Determined physical RAM map:\n"); |
459 | print_memory_map(); | 463 | print_memory_map(); |
460 | 464 | ||
461 | strlcpy(command_line, arcs_cmdline, sizeof(command_line)); | 465 | #ifdef CONFIG_CMDLINE_BOOL |
462 | strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | 466 | #ifdef CONFIG_CMDLINE_OVERRIDE |
467 | strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); | ||
468 | #else | ||
469 | if (builtin_cmdline[0]) { | ||
470 | strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE); | ||
471 | strlcat(arcs_cmdline, builtin_cmdline, COMMAND_LINE_SIZE); | ||
472 | } | ||
473 | strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); | ||
474 | #endif | ||
475 | #else | ||
476 | strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); | ||
477 | #endif | ||
478 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); | ||
463 | 479 | ||
464 | *cmdline_p = command_line; | 480 | *cmdline_p = command_line; |
465 | 481 | ||