powerpc: Remove powerpc specific cmd_line
authorAnton Blanchard <anton@samba.org>
Wed, 17 Sep 2014 04:39:36 +0000 (14:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 Oct 2014 07:33:55 +0000 (17:33 +1000)
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>
arch/powerpc/include/asm/machdep.h
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/mm/init_32.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/setup.c
drivers/cpufreq/pmac32-cpufreq.c
drivers/tty/hvc/hvc_vio.c

index b125ceab149c0a8e428263093334d752ead4bdfa..902ab203aeb275febe0471b6b96d294b06df34b0 100644 (file)
@@ -330,8 +330,6 @@ extern struct machdep_calls *machine_id;
 
 extern void probe_machine(void);
 
-extern char cmd_line[COMMAND_LINE_SIZE];
-
 #ifdef CONFIG_PPC_PMAC
 /*
  * Power macintoshes have either a CUDA, PMU or SMU controlling
index 59576255d22b24feb5830a259f5721ed6e51b81e..099f27e6d1b07e148c0b2c25d8f377d1d4f23654 100644 (file)
@@ -668,14 +668,12 @@ void __init early_init_devtree(void *params)
         * device-tree, including the platform type, initrd location and
         * 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 */
        of_scan_flat_dt(early_init_dt_scan_root, 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();
 
        /* make sure we've parsed cmdline for mem= before this */
index c933acd4e2bd6fc5f0be116c99226aa1e19dc48a..0df37f5e2d548301f88f293a4a43079cea6bba12 100644 (file)
@@ -81,8 +81,6 @@ EXPORT_SYMBOL_GPL(boot_cpuid);
 
 unsigned long klimit = (unsigned long) _end;
 
-char cmd_line[COMMAND_LINE_SIZE];
-
 /*
  * This still seems to be needed... -- paulus
  */ 
index ea4fda60e57b93f18163b487a4bd2a56d43715ba..07831ed0d9efd12c86dce4b6346661b7e9fa216f 100644 (file)
@@ -268,7 +268,7 @@ static void __init exc_lvl_early_init(void)
 /* Warning, IO base is not yet inited */
 void __init setup_arch(char **cmdline_p)
 {
-       *cmdline_p = cmd_line;
+       *cmdline_p = boot_command_line;
 
        /* so udelay does something sensible, assume <= 1000 bogomips */
        loops_per_jiffy = 500000000 / HZ;
index 2ef9893a06bd912fc26474d15a0db9b64d3f4ab7..cd07d79ad21cac659d9966fb09e2ac41fa13a374 100644 (file)
@@ -667,7 +667,7 @@ void __init setup_arch(char **cmdline_p)
 {
        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.
index cff59f1bec238bd41fbcd246d6a732ccc357e1ce..cad68ff8eca5322990cfa56ee46003ae530e1d39 100644 (file)
@@ -106,11 +106,11 @@ unsigned long __max_low_memory = MAX_LOW_MEM;
 void MMU_setup(void)
 {
        /* Check for nobats option (used in mapin_ram). */
-       if (strstr(cmd_line, "nobats")) {
+       if (strstr(boot_command_line, "nobats")) {
                __map_without_bats = 1;
        }
 
-       if (strstr(cmd_line, "noltlbs")) {
+       if (strstr(boot_command_line, "noltlbs")) {
                __map_without_ltlbs = 1;
        }
 #ifdef CONFIG_DEBUG_PAGEALLOC
index 7044fd36197b90a42af0a3196aabc5c9bd2e971b..5b77b1919fd21b5007f5dadc10e1f8a2129553aa 100644 (file)
@@ -258,7 +258,7 @@ static void chrp_init_early(void)
        struct device_node *node;
        const char *property;
 
-       if (strstr(cmd_line, "console="))
+       if (strstr(boot_command_line, "console="))
                return;
        /* find the boot console from /chosen/stdout */
        if (!of_chosen)
index 141f8899a633f04182d65179c410b53a78a74109..b127a29ac526dd0e27e5f5a7b487c0d58c2ae9c1 100644 (file)
@@ -336,7 +336,7 @@ static void __init pmac_setup_arch(void)
 #endif
 
 #ifdef CONFIG_ADB
-       if (strstr(cmd_line, "adb_sync")) {
+       if (strstr(boot_command_line, "adb_sync")) {
                extern int __adb_probe_sync;
                __adb_probe_sync = 1;
        }
@@ -460,7 +460,7 @@ pmac_halt(void)
 static void __init pmac_init_early(void)
 {
        /* Enable early btext debug if requested */
-       if (strstr(cmd_line, "btextdbg")) {
+       if (strstr(boot_command_line, "btextdbg")) {
                udbg_adb_init_early();
                register_early_udbg_console();
        }
@@ -469,8 +469,8 @@ static void __init pmac_init_early(void)
        pmac_feature_init();
 
        /* Initialize debug stuff */
-       udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
-       udbg_adb_init(!!strstr(cmd_line, "btextdbg"));
+       udbg_scc_init(!!strstr(boot_command_line, "sccdbg"));
+       udbg_adb_init(!!strstr(boot_command_line, "btextdbg"));
 
 #ifdef CONFIG_PPC64
        iommu_init_early_dart();
index 7615180d7ee3c497e915d72f18af11e9b3f09c5c..1f49d97a70ea164737570c3480a2dcac30265788 100644 (file)
@@ -611,7 +611,7 @@ static int __init pmac_cpufreq_setup(void)
        struct device_node      *cpunode;
        const u32               *value;
 
-       if (strstr(cmd_line, "nocpufreq"))
+       if (strstr(boot_command_line, "nocpufreq"))
                return 0;
 
        /* Get first CPU node */
index 5618b5fc7500e149dfd79ac2515309749f905834..f575a9b5ede7b05bd24c87ecf58425e89ec20fdc 100644 (file)
@@ -452,7 +452,7 @@ void __init hvc_vio_init_early(void)
                return;
 #endif
        /* 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);
        hvc_instantiate(0, 0, ops);
 }