From: Jonas Gorski <jogo@openwrt.org>
To: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>,
Kevin Cernekee <cernekee@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>,
James Hogan <james.hogan@imgtec.com>,
John Crispin <blogic@openwrt.org>,
Ganesan Ramalingam <ganesanr@broadcom.com>,
Jayachandran C <jchandra@broadcom.com>,
Andrew Bresticker <abrestic@chromium.org>,
James Hartley <james.hartley@imgtec.com>
Subject: [PATCH 3/3] MIPS: make MIPS_CMDLINE_DTB default
Date: Sat, 12 Sep 2015 18:26:14 +0200 [thread overview]
Message-ID: <1442075174-30414-4-git-send-email-jogo@openwrt.org> (raw)
In-Reply-To: <1442075174-30414-1-git-send-email-jogo@openwrt.org>
Seval of-enabled machines (bmips, lantiq, xlp, pistachio, ralink) copied
the arguments from dtb to arcs_command_line to prevent the kernel from
overwriting them.
Since there is now an option to keep the dtb arguments, default to the
new option remove the "backup" to arcs_command_line in case of USE_OF is
enabled, except for those platforms that still take the bootloader
arguments or do not use any at all.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
arch/mips/Kconfig | 3 +++
arch/mips/bmips/setup.c | 1 -
arch/mips/lantiq/prom.c | 2 --
arch/mips/netlogic/xlp/dt.c | 1 -
arch/mips/pistachio/init.c | 1 -
arch/mips/ralink/of.c | 2 --
6 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 3753437..703142b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2730,6 +2730,9 @@ endchoice
choice
prompt "Kernel command line type" if !CMDLINE_OVERRIDE
+ default MIPS_CMDLINE_FROM_DTB if USE_OF && !ATh79 && !MACH_INGENIC && \
+ !MIPS_MALTA && !MIPS_SEAD3 && \
+ !CAVIUM_OCTEON_SOC
default MIPS_CMDLINE_FROM_BOOTLOADER
config MIPS_CMDLINE_FROM_DTB
diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c
index 526ec27..5b16d29 100644
--- a/arch/mips/bmips/setup.c
+++ b/arch/mips/bmips/setup.c
@@ -157,7 +157,6 @@ void __init plat_mem_setup(void)
panic("no dtb found");
__dt_setup_arch(dtb);
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
for (q = bmips_quirk_list; q->quirk_fn; q++) {
if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
index 0db099e..297bcaa 100644
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
@@ -77,8 +77,6 @@ void __init plat_mem_setup(void)
* parsed resulting in our memory appearing
*/
__dt_setup_arch(__dtb_start);
-
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
}
void __init device_tree_init(void)
diff --git a/arch/mips/netlogic/xlp/dt.c b/arch/mips/netlogic/xlp/dt.c
index a625bdb..856a6e6 100644
--- a/arch/mips/netlogic/xlp/dt.c
+++ b/arch/mips/netlogic/xlp/dt.c
@@ -87,7 +87,6 @@ void __init *xlp_dt_init(void *fdtp)
void __init xlp_early_init_devtree(void)
{
__dt_setup_arch(xlp_fdt_blob);
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
}
void __init device_tree_init(void)
diff --git a/arch/mips/pistachio/init.c b/arch/mips/pistachio/init.c
index 8bd8ebb..96ba2cc 100644
--- a/arch/mips/pistachio/init.c
+++ b/arch/mips/pistachio/init.c
@@ -58,7 +58,6 @@ void __init plat_mem_setup(void)
panic("Device-tree not present");
__dt_setup_arch((void *)fw_arg1);
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
plat_setup_iocoherency();
}
diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
index 0d30dcd..f9eda5d 100644
--- a/arch/mips/ralink/of.c
+++ b/arch/mips/ralink/of.c
@@ -74,8 +74,6 @@ void __init plat_mem_setup(void)
*/
__dt_setup_arch(__dtb_start);
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
-
of_scan_flat_dt(early_init_dt_find_memory, NULL);
if (memory_dtb)
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
--
2.1.4
next prev parent reply other threads:[~2015-09-12 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-12 16:26 [PATCH 0/3] MIPS: allow keeping the dtb command line Jonas Gorski
2015-09-12 16:26 ` [PATCH 1/3] MIPS: use USE_OF as the guard for appended dtb Jonas Gorski
2015-09-12 16:26 ` [PATCH 2/3] MIPS: make the kernel arguments from dtb available Jonas Gorski
2015-09-12 16:26 ` Jonas Gorski [this message]
2015-09-12 18:53 ` [PATCH 3/3] MIPS: make MIPS_CMDLINE_DTB default Hauke Mehrtens
2015-09-12 19:01 ` Jonas Gorski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442075174-30414-4-git-send-email-jogo@openwrt.org \
--to=jogo@openwrt.org \
--cc=Zubair.Kakakhel@imgtec.com \
--cc=abrestic@chromium.org \
--cc=blogic@openwrt.org \
--cc=cernekee@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=ganesanr@broadcom.com \
--cc=james.hartley@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=jchandra@broadcom.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.