Commit bbf28b50 authored by Rob Herring's avatar Rob Herring

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: default avatarRob Herring <rob.herring@calxeda.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: linux@lists.openrisc.net
Reviewed-by: default avatarGrant Likely <grant.likely@linaro.org>
parent 312717f1
...@@ -47,8 +47,6 @@ ...@@ -47,8 +47,6 @@
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/setup.h> #include <asm/setup.h>
extern char cmd_line[COMMAND_LINE_SIZE];
void __init early_init_dt_add_memory_arch(u64 base, u64 size) void __init early_init_dt_add_memory_arch(u64 base, u64 size)
{ {
size &= PAGE_MASK; size &= PAGE_MASK;
...@@ -67,15 +65,12 @@ void __init early_init_devtree(void *params) ...@@ -67,15 +65,12 @@ void __init early_init_devtree(void *params)
* device-tree, including the platform type, initrd location and * device-tree, including the platform type, initrd location and
* size, TCE reserve, and more ... * size, TCE reserve, and more ...
*/ */
of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line); of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
/* Scan memory nodes and rebuild MEMBLOCKs */ /* Scan memory nodes and rebuild MEMBLOCKs */
of_scan_flat_dt(early_init_dt_scan_root, NULL); of_scan_flat_dt(early_init_dt_scan_root, NULL);
of_scan_flat_dt(early_init_dt_scan_memory, NULL); of_scan_flat_dt(early_init_dt_scan_memory, NULL);
/* Save command line for /proc/cmdline and then parse parameters */
strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
memblock_allow_resize(); memblock_allow_resize();
/* We must copy the flattend device tree from init memory to regular /* We must copy the flattend device tree from init memory to regular
......
...@@ -50,8 +50,6 @@ ...@@ -50,8 +50,6 @@
#include "vmlinux.h" #include "vmlinux.h"
char __initdata cmd_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
static unsigned long __init setup_memory(void) static unsigned long __init setup_memory(void)
{ {
unsigned long bootmap_size; unsigned long bootmap_size;
...@@ -316,7 +314,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -316,7 +314,7 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &dummy_con; conswitchp = &dummy_con;
#endif #endif
*cmdline_p = cmd_line; *cmdline_p = boot_command_line;
printk(KERN_INFO "OpenRISC Linux -- http://openrisc.net\n"); printk(KERN_INFO "OpenRISC Linux -- http://openrisc.net\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment