Skip to content

Commit 3e47d14

Browse files
antonblanchardmpe
authored andcommitted
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: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent c7d1f6a commit 3e47d14

10 files changed

Lines changed: 12 additions & 18 deletions

File tree

‎arch/powerpc/include/asm/machdep.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ extern struct machdep_calls *machine_id;
330330

331331
extern void probe_machine(void);
332332

333-
extern char cmd_line[COMMAND_LINE_SIZE];
334-
335333
#ifdef CONFIG_PPC_PMAC
336334
/*
337335
* Power macintoshes have either a CUDA, PMU or SMU controlling

‎arch/powerpc/kernel/prom.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,14 +668,12 @@ void __init early_init_devtree(void *params)
668668
* device-tree, including the platform type, initrd location and
669669
* size, TCE reserve, and more ...
670670
*/
671-
of_scan_flat_dt(early_init_dt_scan_chosen_ppc, cmd_line);
671+
of_scan_flat_dt(early_init_dt_scan_chosen_ppc, boot_command_line);
672672

673673
/* Scan memory nodes and rebuild MEMBLOCKs */
674674
of_scan_flat_dt(early_init_dt_scan_root, NULL);
675675
of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
676676

677-
/* Save command line for /proc/cmdline and then parse parameters */
678-
strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
679677
parse_early_param();
680678

681679
/* make sure we've parsed cmdline for mem= before this */

‎arch/powerpc/kernel/setup-common.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ EXPORT_SYMBOL_GPL(boot_cpuid);
8181

8282
unsigned long klimit = (unsigned long) _end;
8383

84-
char cmd_line[COMMAND_LINE_SIZE];
85-
8684
/*
8785
* This still seems to be needed... -- paulus
8886
*/

‎arch/powerpc/kernel/setup_32.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void __init exc_lvl_early_init(void)
268268
/* Warning, IO base is not yet inited */
269269
void __init setup_arch(char **cmdline_p)
270270
{
271-
*cmdline_p = cmd_line;
271+
*cmdline_p = boot_command_line;
272272

273273
/* so udelay does something sensible, assume <= 1000 bogomips */
274274
loops_per_jiffy = 500000000 / HZ;

‎arch/powerpc/kernel/setup_64.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ void __init setup_arch(char **cmdline_p)
667667
{
668668
ppc64_boot_msg(0x12, "Setup Arch");
669669

670-
*cmdline_p = cmd_line;
670+
*cmdline_p = boot_command_line;
671671

672672
/*
673673
* Set cache line size based on type of cpu as a default.

‎arch/powerpc/mm/init_32.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ unsigned long __max_low_memory = MAX_LOW_MEM;
106106
void MMU_setup(void)
107107
{
108108
/* Check for nobats option (used in mapin_ram). */
109-
if (strstr(cmd_line, "nobats")) {
109+
if (strstr(boot_command_line, "nobats")) {
110110
__map_without_bats = 1;
111111
}
112112

113-
if (strstr(cmd_line, "noltlbs")) {
113+
if (strstr(boot_command_line, "noltlbs")) {
114114
__map_without_ltlbs = 1;
115115
}
116116
#ifdef CONFIG_DEBUG_PAGEALLOC

‎arch/powerpc/platforms/chrp/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static void chrp_init_early(void)
258258
struct device_node *node;
259259
const char *property;
260260

261-
if (strstr(cmd_line, "console="))
261+
if (strstr(boot_command_line, "console="))
262262
return;
263263
/* find the boot console from /chosen/stdout */
264264
if (!of_chosen)

‎arch/powerpc/platforms/powermac/setup.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static void __init pmac_setup_arch(void)
336336
#endif
337337

338338
#ifdef CONFIG_ADB
339-
if (strstr(cmd_line, "adb_sync")) {
339+
if (strstr(boot_command_line, "adb_sync")) {
340340
extern int __adb_probe_sync;
341341
__adb_probe_sync = 1;
342342
}
@@ -460,7 +460,7 @@ pmac_halt(void)
460460
static void __init pmac_init_early(void)
461461
{
462462
/* Enable early btext debug if requested */
463-
if (strstr(cmd_line, "btextdbg")) {
463+
if (strstr(boot_command_line, "btextdbg")) {
464464
udbg_adb_init_early();
465465
register_early_udbg_console();
466466
}
@@ -469,8 +469,8 @@ static void __init pmac_init_early(void)
469469
pmac_feature_init();
470470

471471
/* Initialize debug stuff */
472-
udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
473-
udbg_adb_init(!!strstr(cmd_line, "btextdbg"));
472+
udbg_scc_init(!!strstr(boot_command_line, "sccdbg"));
473+
udbg_adb_init(!!strstr(boot_command_line, "btextdbg"));
474474

475475
#ifdef CONFIG_PPC64
476476
iommu_init_early_dart();

‎drivers/cpufreq/pmac32-cpufreq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static int __init pmac_cpufreq_setup(void)
611611
struct device_node *cpunode;
612612
const u32 *value;
613613

614-
if (strstr(cmd_line, "nocpufreq"))
614+
if (strstr(boot_command_line, "nocpufreq"))
615615
return 0;
616616

617617
/* Get first CPU node */

‎drivers/tty/hvc/hvc_vio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ void __init hvc_vio_init_early(void)
452452
return;
453453
#endif
454454
/* Check whether the user has requested a different console. */
455-
if (!strstr(cmd_line, "console="))
455+
if (!strstr(boot_command_line, "console="))
456456
add_preferred_console("hvc", 0, NULL);
457457
hvc_instantiate(0, 0, ops);
458458
}

0 commit comments

Comments
 (0)