diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-08-26 12:28:50 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-09 12:38:02 -0400 |
commit | bbf28b505ac2dd923b9051ca5031cf87bf7c40cc (patch) | |
tree | 93b7b0ee24f52f5ce3b8257cbd2f3ae92a54d965 /arch/openrisc | |
parent | 312717f15ac7095c3ea98d487276781535ca7c0b (diff) |
openrisc: use boot_command_line instead of private cmd_line
Save some pointless copying of the kernel command line and just use
boot_command_line instead. The DT code already handles CONFIG_CMDLINE,
so a separate copy is not needed.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: linux@lists.openrisc.net
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch/openrisc')
-rw-r--r-- | arch/openrisc/kernel/prom.c | 7 | ||||
-rw-r--r-- | arch/openrisc/kernel/setup.c | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/arch/openrisc/kernel/prom.c b/arch/openrisc/kernel/prom.c index a63e76872f84..bf3fd05703c3 100644 --- a/arch/openrisc/kernel/prom.c +++ b/arch/openrisc/kernel/prom.c | |||
@@ -47,8 +47,6 @@ | |||
47 | #include <asm/sections.h> | 47 | #include <asm/sections.h> |
48 | #include <asm/setup.h> | 48 | #include <asm/setup.h> |
49 | 49 | ||
50 | extern char cmd_line[COMMAND_LINE_SIZE]; | ||
51 | |||
52 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | 50 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) |
53 | { | 51 | { |
54 | size &= PAGE_MASK; | 52 | size &= PAGE_MASK; |
@@ -67,15 +65,12 @@ void __init early_init_devtree(void *params) | |||
67 | * device-tree, including the platform type, initrd location and | 65 | * device-tree, including the platform type, initrd location and |
68 | * size, TCE reserve, and more ... | 66 | * size, TCE reserve, and more ... |
69 | */ | 67 | */ |
70 | of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line); | 68 | of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); |
71 | 69 | ||
72 | /* Scan memory nodes and rebuild MEMBLOCKs */ | 70 | /* Scan memory nodes and rebuild MEMBLOCKs */ |
73 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 71 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
74 | of_scan_flat_dt(early_init_dt_scan_memory, NULL); | 72 | of_scan_flat_dt(early_init_dt_scan_memory, NULL); |
75 | 73 | ||
76 | /* Save command line for /proc/cmdline and then parse parameters */ | ||
77 | strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE); | ||
78 | |||
79 | memblock_allow_resize(); | 74 | memblock_allow_resize(); |
80 | 75 | ||
81 | /* We must copy the flattend device tree from init memory to regular | 76 | /* We must copy the flattend device tree from init memory to regular |
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c index d7359ffbcbdd..719c5c8895c4 100644 --- a/arch/openrisc/kernel/setup.c +++ b/arch/openrisc/kernel/setup.c | |||
@@ -50,8 +50,6 @@ | |||
50 | 50 | ||
51 | #include "vmlinux.h" | 51 | #include "vmlinux.h" |
52 | 52 | ||
53 | char __initdata cmd_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; | ||
54 | |||
55 | static unsigned long __init setup_memory(void) | 53 | static unsigned long __init setup_memory(void) |
56 | { | 54 | { |
57 | unsigned long bootmap_size; | 55 | unsigned long bootmap_size; |
@@ -316,7 +314,7 @@ void __init setup_arch(char **cmdline_p) | |||
316 | conswitchp = &dummy_con; | 314 | conswitchp = &dummy_con; |
317 | #endif | 315 | #endif |
318 | 316 | ||
319 | *cmdline_p = cmd_line; | 317 | *cmdline_p = boot_command_line; |
320 | 318 | ||
321 | printk(KERN_INFO "OpenRISC Linux -- http://openrisc.net\n"); | 319 | printk(KERN_INFO "OpenRISC Linux -- http://openrisc.net\n"); |
322 | } | 320 | } |