提交 3e47d147 编写于 作者: A Anton Blanchard 提交者: Michael Ellerman

powerpc: Remove powerpc specific cmd_line

There is no need for yet another copy of the command line, just
use boot_command_line like everyone else.
Signed-off-by: NAnton Blanchard <anton@samba.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 c7d1f6af
...@@ -330,8 +330,6 @@ extern struct machdep_calls *machine_id; ...@@ -330,8 +330,6 @@ extern struct machdep_calls *machine_id;
extern void probe_machine(void); extern void probe_machine(void);
extern char cmd_line[COMMAND_LINE_SIZE];
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
/* /*
* Power macintoshes have either a CUDA, PMU or SMU controlling * Power macintoshes have either a CUDA, PMU or SMU controlling
......
...@@ -668,14 +668,12 @@ void __init early_init_devtree(void *params) ...@@ -668,14 +668,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_ppc, cmd_line); of_scan_flat_dt(early_init_dt_scan_chosen_ppc, 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_ppc, NULL); of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
/* Save command line for /proc/cmdline and then parse parameters */
strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
parse_early_param(); parse_early_param();
/* make sure we've parsed cmdline for mem= before this */ /* make sure we've parsed cmdline for mem= before this */
......
...@@ -81,8 +81,6 @@ EXPORT_SYMBOL_GPL(boot_cpuid); ...@@ -81,8 +81,6 @@ EXPORT_SYMBOL_GPL(boot_cpuid);
unsigned long klimit = (unsigned long) _end; unsigned long klimit = (unsigned long) _end;
char cmd_line[COMMAND_LINE_SIZE];
/* /*
* This still seems to be needed... -- paulus * This still seems to be needed... -- paulus
*/ */
......
...@@ -268,7 +268,7 @@ static void __init exc_lvl_early_init(void) ...@@ -268,7 +268,7 @@ static void __init exc_lvl_early_init(void)
/* Warning, IO base is not yet inited */ /* Warning, IO base is not yet inited */
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
*cmdline_p = cmd_line; *cmdline_p = boot_command_line;
/* so udelay does something sensible, assume <= 1000 bogomips */ /* so udelay does something sensible, assume <= 1000 bogomips */
loops_per_jiffy = 500000000 / HZ; loops_per_jiffy = 500000000 / HZ;
......
...@@ -667,7 +667,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -667,7 +667,7 @@ void __init setup_arch(char **cmdline_p)
{ {
ppc64_boot_msg(0x12, "Setup Arch"); ppc64_boot_msg(0x12, "Setup Arch");
*cmdline_p = cmd_line; *cmdline_p = boot_command_line;
/* /*
* Set cache line size based on type of cpu as a default. * Set cache line size based on type of cpu as a default.
......
...@@ -106,11 +106,11 @@ unsigned long __max_low_memory = MAX_LOW_MEM; ...@@ -106,11 +106,11 @@ unsigned long __max_low_memory = MAX_LOW_MEM;
void MMU_setup(void) void MMU_setup(void)
{ {
/* Check for nobats option (used in mapin_ram). */ /* Check for nobats option (used in mapin_ram). */
if (strstr(cmd_line, "nobats")) { if (strstr(boot_command_line, "nobats")) {
__map_without_bats = 1; __map_without_bats = 1;
} }
if (strstr(cmd_line, "noltlbs")) { if (strstr(boot_command_line, "noltlbs")) {
__map_without_ltlbs = 1; __map_without_ltlbs = 1;
} }
#ifdef CONFIG_DEBUG_PAGEALLOC #ifdef CONFIG_DEBUG_PAGEALLOC
......
...@@ -258,7 +258,7 @@ static void chrp_init_early(void) ...@@ -258,7 +258,7 @@ static void chrp_init_early(void)
struct device_node *node; struct device_node *node;
const char *property; const char *property;
if (strstr(cmd_line, "console=")) if (strstr(boot_command_line, "console="))
return; return;
/* find the boot console from /chosen/stdout */ /* find the boot console from /chosen/stdout */
if (!of_chosen) if (!of_chosen)
......
...@@ -336,7 +336,7 @@ static void __init pmac_setup_arch(void) ...@@ -336,7 +336,7 @@ static void __init pmac_setup_arch(void)
#endif #endif
#ifdef CONFIG_ADB #ifdef CONFIG_ADB
if (strstr(cmd_line, "adb_sync")) { if (strstr(boot_command_line, "adb_sync")) {
extern int __adb_probe_sync; extern int __adb_probe_sync;
__adb_probe_sync = 1; __adb_probe_sync = 1;
} }
...@@ -460,7 +460,7 @@ pmac_halt(void) ...@@ -460,7 +460,7 @@ pmac_halt(void)
static void __init pmac_init_early(void) static void __init pmac_init_early(void)
{ {
/* Enable early btext debug if requested */ /* Enable early btext debug if requested */
if (strstr(cmd_line, "btextdbg")) { if (strstr(boot_command_line, "btextdbg")) {
udbg_adb_init_early(); udbg_adb_init_early();
register_early_udbg_console(); register_early_udbg_console();
} }
...@@ -469,8 +469,8 @@ static void __init pmac_init_early(void) ...@@ -469,8 +469,8 @@ static void __init pmac_init_early(void)
pmac_feature_init(); pmac_feature_init();
/* Initialize debug stuff */ /* Initialize debug stuff */
udbg_scc_init(!!strstr(cmd_line, "sccdbg")); udbg_scc_init(!!strstr(boot_command_line, "sccdbg"));
udbg_adb_init(!!strstr(cmd_line, "btextdbg")); udbg_adb_init(!!strstr(boot_command_line, "btextdbg"));
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
iommu_init_early_dart(); iommu_init_early_dart();
......
...@@ -611,7 +611,7 @@ static int __init pmac_cpufreq_setup(void) ...@@ -611,7 +611,7 @@ static int __init pmac_cpufreq_setup(void)
struct device_node *cpunode; struct device_node *cpunode;
const u32 *value; const u32 *value;
if (strstr(cmd_line, "nocpufreq")) if (strstr(boot_command_line, "nocpufreq"))
return 0; return 0;
/* Get first CPU node */ /* Get first CPU node */
......
...@@ -452,7 +452,7 @@ void __init hvc_vio_init_early(void) ...@@ -452,7 +452,7 @@ void __init hvc_vio_init_early(void)
return; return;
#endif #endif
/* Check whether the user has requested a different console. */ /* Check whether the user has requested a different console. */
if (!strstr(cmd_line, "console=")) if (!strstr(boot_command_line, "console="))
add_preferred_console("hvc", 0, NULL); add_preferred_console("hvc", 0, NULL);
hvc_instantiate(0, 0, ops); hvc_instantiate(0, 0, ops);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册