All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: will@kernel.org, danielwa@cisco.com, robh@kernel.org,
	daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org,
	akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, devicetree@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	microblaze <monstr@monstr.eu>,
	linux-mips@vger.kernel.org, nios2 <ley.foon.tan@intel.com>,
	openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org,
	linux-riscv@lists.infradead.org, x86@kernel.org,
	linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
	sparclinux@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH v4 08/20] arm: Convert to GENERIC_CMDLINE
Date: Fri,  2 Apr 2021 15:18:09 +0000 (UTC)	[thread overview]
Message-ID: <2e49b9ae60a90aec8b555946279cab059a2812a4.1617375802.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1617375802.git.christophe.leroy@csgroup.eu>

This converts the architecture to GENERIC_CMDLINE.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4:
- Removed dependency to ATAGS
- Removed the message when forcing
---
 arch/arm/Kconfig              | 38 +----------------------------------
 arch/arm/kernel/atags_parse.c | 13 +++---------
 2 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5da96f5df48f..1a1808b0eef7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@ config ARM
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+	select GENERIC_CMDLINE
 	select GENERIC_IRQ_IPI if SMP
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_EARLY_IOREMAP
@@ -1740,43 +1741,6 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND
 
 endchoice
 
-config CMDLINE
-	string "Default kernel command string"
-	default ""
-	help
-	  On some architectures (e.g. CATS), there is currently no way
-	  for the boot loader to pass arguments to the kernel. For these
-	  architectures, you should supply some command-line options at build
-	  time by entering them here. As a minimum, you should specify the
-	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-choice
-	prompt "Kernel command line type" if CMDLINE != ""
-	default CMDLINE_FROM_BOOTLOADER
-	depends on ATAGS
-
-config CMDLINE_FROM_BOOTLOADER
-	bool "Use bootloader kernel arguments if available"
-	help
-	  Uses the command-line options passed by the boot loader. If
-	  the boot loader doesn't provide any, the default kernel command
-	  string provided in CMDLINE will be used.
-
-config CMDLINE_EXTEND
-	bool "Extend bootloader kernel arguments"
-	help
-	  The command-line arguments provided by the boot loader will be
-	  appended to the default kernel command string.
-
-config CMDLINE_FORCE
-	bool "Always use the default kernel command string"
-	help
-	  Always use the default kernel command string, even if the boot
-	  loader passes other arguments to the kernel.
-	  This is useful if you cannot or don't want to change the
-	  command-line options your boot loader passes to the kernel.
-endchoice
-
 config XIP_KERNEL
 	bool "Kernel Execute-In-Place from ROM"
 	depends on !ARM_LPAE && !ARCH_MULTIPLATFORM
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 373b61f9a4f0..ef97ec015c51 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -14,6 +14,7 @@
  * is not parsed in any way).
  */
 
+#include <linux/cmdline.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
 #include <linux/kernel.h>
@@ -120,16 +121,8 @@ __tagtable(ATAG_REVISION, parse_tag_revision);
 
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
-#if defined(CONFIG_CMDLINE_EXTEND)
-	strlcat(default_command_line, " ", COMMAND_LINE_SIZE);
-	strlcat(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#elif defined(CONFIG_CMDLINE_FORCE)
-	pr_warn("Ignoring tag cmdline (using the default kernel command line)\n");
-#else
-	strlcpy(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#endif
+	cmdline_build(default_command_line, tag->u.cmdline.cmdline);
+
 	return 0;
 }
 
-- 
2.25.0


WARNING: multiple messages have this Message-ID (diff)
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: will@kernel.org, danielwa@cisco.com, robh@kernel.org,
	daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org,
	akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, devicetree@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	microblaze <monstr@monstr.eu>,
	linux-mips@vger.kernel.org, nios2 <ley.foon.tan@intel.com>,
	openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org,
	linux-riscv@lists.infradead.org, x86@kernel.org,
	linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
	sparclinux@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH v4 08/20] arm: Convert to GENERIC_CMDLINE
Date: Fri,  2 Apr 2021 15:18:09 +0000 (UTC)	[thread overview]
Message-ID: <2e49b9ae60a90aec8b555946279cab059a2812a4.1617375802.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1617375802.git.christophe.leroy@csgroup.eu>

This converts the architecture to GENERIC_CMDLINE.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4:
- Removed dependency to ATAGS
- Removed the message when forcing
---
 arch/arm/Kconfig              | 38 +----------------------------------
 arch/arm/kernel/atags_parse.c | 13 +++---------
 2 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5da96f5df48f..1a1808b0eef7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@ config ARM
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+	select GENERIC_CMDLINE
 	select GENERIC_IRQ_IPI if SMP
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_EARLY_IOREMAP
@@ -1740,43 +1741,6 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND
 
 endchoice
 
-config CMDLINE
-	string "Default kernel command string"
-	default ""
-	help
-	  On some architectures (e.g. CATS), there is currently no way
-	  for the boot loader to pass arguments to the kernel. For these
-	  architectures, you should supply some command-line options at build
-	  time by entering them here. As a minimum, you should specify the
-	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-choice
-	prompt "Kernel command line type" if CMDLINE != ""
-	default CMDLINE_FROM_BOOTLOADER
-	depends on ATAGS
-
-config CMDLINE_FROM_BOOTLOADER
-	bool "Use bootloader kernel arguments if available"
-	help
-	  Uses the command-line options passed by the boot loader. If
-	  the boot loader doesn't provide any, the default kernel command
-	  string provided in CMDLINE will be used.
-
-config CMDLINE_EXTEND
-	bool "Extend bootloader kernel arguments"
-	help
-	  The command-line arguments provided by the boot loader will be
-	  appended to the default kernel command string.
-
-config CMDLINE_FORCE
-	bool "Always use the default kernel command string"
-	help
-	  Always use the default kernel command string, even if the boot
-	  loader passes other arguments to the kernel.
-	  This is useful if you cannot or don't want to change the
-	  command-line options your boot loader passes to the kernel.
-endchoice
-
 config XIP_KERNEL
 	bool "Kernel Execute-In-Place from ROM"
 	depends on !ARM_LPAE && !ARCH_MULTIPLATFORM
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 373b61f9a4f0..ef97ec015c51 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -14,6 +14,7 @@
  * is not parsed in any way).
  */
 
+#include <linux/cmdline.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
 #include <linux/kernel.h>
@@ -120,16 +121,8 @@ __tagtable(ATAG_REVISION, parse_tag_revision);
 
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
-#if defined(CONFIG_CMDLINE_EXTEND)
-	strlcat(default_command_line, " ", COMMAND_LINE_SIZE);
-	strlcat(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#elif defined(CONFIG_CMDLINE_FORCE)
-	pr_warn("Ignoring tag cmdline (using the default kernel command line)\n");
-#else
-	strlcpy(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#endif
+	cmdline_build(default_command_line, tag->u.cmdline.cmdline);
+
 	return 0;
 }
 
-- 
2.25.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: will@kernel.org, danielwa@cisco.com, robh@kernel.org,
	daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org,
	akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, devicetree@vger.kernel.org,
	microblaze <monstr@monstr.eu>,
	linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
	linux-hexagon@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org, nios2 <ley.foon.tan@intel.com>,
	linux-mips@vger.kernel.org, linux-mm@kvack.org,
	openrisc@lists.librecores.org, sparclinux@vger.kernel.org,
	linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 08/20] arm: Convert to GENERIC_CMDLINE
Date: Fri,  2 Apr 2021 15:18:09 +0000 (UTC)	[thread overview]
Message-ID: <2e49b9ae60a90aec8b555946279cab059a2812a4.1617375802.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1617375802.git.christophe.leroy@csgroup.eu>

This converts the architecture to GENERIC_CMDLINE.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4:
- Removed dependency to ATAGS
- Removed the message when forcing
---
 arch/arm/Kconfig              | 38 +----------------------------------
 arch/arm/kernel/atags_parse.c | 13 +++---------
 2 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5da96f5df48f..1a1808b0eef7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@ config ARM
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+	select GENERIC_CMDLINE
 	select GENERIC_IRQ_IPI if SMP
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_EARLY_IOREMAP
@@ -1740,43 +1741,6 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND
 
 endchoice
 
-config CMDLINE
-	string "Default kernel command string"
-	default ""
-	help
-	  On some architectures (e.g. CATS), there is currently no way
-	  for the boot loader to pass arguments to the kernel. For these
-	  architectures, you should supply some command-line options at build
-	  time by entering them here. As a minimum, you should specify the
-	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-choice
-	prompt "Kernel command line type" if CMDLINE != ""
-	default CMDLINE_FROM_BOOTLOADER
-	depends on ATAGS
-
-config CMDLINE_FROM_BOOTLOADER
-	bool "Use bootloader kernel arguments if available"
-	help
-	  Uses the command-line options passed by the boot loader. If
-	  the boot loader doesn't provide any, the default kernel command
-	  string provided in CMDLINE will be used.
-
-config CMDLINE_EXTEND
-	bool "Extend bootloader kernel arguments"
-	help
-	  The command-line arguments provided by the boot loader will be
-	  appended to the default kernel command string.
-
-config CMDLINE_FORCE
-	bool "Always use the default kernel command string"
-	help
-	  Always use the default kernel command string, even if the boot
-	  loader passes other arguments to the kernel.
-	  This is useful if you cannot or don't want to change the
-	  command-line options your boot loader passes to the kernel.
-endchoice
-
 config XIP_KERNEL
 	bool "Kernel Execute-In-Place from ROM"
 	depends on !ARM_LPAE && !ARCH_MULTIPLATFORM
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 373b61f9a4f0..ef97ec015c51 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -14,6 +14,7 @@
  * is not parsed in any way).
  */
 
+#include <linux/cmdline.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
 #include <linux/kernel.h>
@@ -120,16 +121,8 @@ __tagtable(ATAG_REVISION, parse_tag_revision);
 
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
-#if defined(CONFIG_CMDLINE_EXTEND)
-	strlcat(default_command_line, " ", COMMAND_LINE_SIZE);
-	strlcat(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#elif defined(CONFIG_CMDLINE_FORCE)
-	pr_warn("Ignoring tag cmdline (using the default kernel command line)\n");
-#else
-	strlcpy(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#endif
+	cmdline_build(default_command_line, tag->u.cmdline.cmdline);
+
 	return 0;
 }
 
-- 
2.25.0


WARNING: multiple messages have this Message-ID (diff)
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: will@kernel.org, danielwa@cisco.com, robh@kernel.org,
	daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org,
	akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, devicetree@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	microblaze <monstr@monstr.eu>,
	linux-mips@vger.kernel.org, nios2 <ley.foon.tan@intel.com>,
	openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org,
	linux-riscv@lists.infradead.org, x86@kernel.org,
	linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
	sparclinux@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH v4 08/20] arm: Convert to GENERIC_CMDLINE
Date: Fri,  2 Apr 2021 15:18:09 +0000 (UTC)	[thread overview]
Message-ID: <2e49b9ae60a90aec8b555946279cab059a2812a4.1617375802.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1617375802.git.christophe.leroy@csgroup.eu>

This converts the architecture to GENERIC_CMDLINE.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4:
- Removed dependency to ATAGS
- Removed the message when forcing
---
 arch/arm/Kconfig              | 38 +----------------------------------
 arch/arm/kernel/atags_parse.c | 13 +++---------
 2 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5da96f5df48f..1a1808b0eef7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@ config ARM
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+	select GENERIC_CMDLINE
 	select GENERIC_IRQ_IPI if SMP
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_EARLY_IOREMAP
@@ -1740,43 +1741,6 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND
 
 endchoice
 
-config CMDLINE
-	string "Default kernel command string"
-	default ""
-	help
-	  On some architectures (e.g. CATS), there is currently no way
-	  for the boot loader to pass arguments to the kernel. For these
-	  architectures, you should supply some command-line options at build
-	  time by entering them here. As a minimum, you should specify the
-	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-choice
-	prompt "Kernel command line type" if CMDLINE != ""
-	default CMDLINE_FROM_BOOTLOADER
-	depends on ATAGS
-
-config CMDLINE_FROM_BOOTLOADER
-	bool "Use bootloader kernel arguments if available"
-	help
-	  Uses the command-line options passed by the boot loader. If
-	  the boot loader doesn't provide any, the default kernel command
-	  string provided in CMDLINE will be used.
-
-config CMDLINE_EXTEND
-	bool "Extend bootloader kernel arguments"
-	help
-	  The command-line arguments provided by the boot loader will be
-	  appended to the default kernel command string.
-
-config CMDLINE_FORCE
-	bool "Always use the default kernel command string"
-	help
-	  Always use the default kernel command string, even if the boot
-	  loader passes other arguments to the kernel.
-	  This is useful if you cannot or don't want to change the
-	  command-line options your boot loader passes to the kernel.
-endchoice
-
 config XIP_KERNEL
 	bool "Kernel Execute-In-Place from ROM"
 	depends on !ARM_LPAE && !ARCH_MULTIPLATFORM
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 373b61f9a4f0..ef97ec015c51 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -14,6 +14,7 @@
  * is not parsed in any way).
  */
 
+#include <linux/cmdline.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
 #include <linux/kernel.h>
@@ -120,16 +121,8 @@ __tagtable(ATAG_REVISION, parse_tag_revision);
 
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
-#if defined(CONFIG_CMDLINE_EXTEND)
-	strlcat(default_command_line, " ", COMMAND_LINE_SIZE);
-	strlcat(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#elif defined(CONFIG_CMDLINE_FORCE)
-	pr_warn("Ignoring tag cmdline (using the default kernel command line)\n");
-#else
-	strlcpy(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#endif
+	cmdline_build(default_command_line, tag->u.cmdline.cmdline);
+
 	return 0;
 }
 
-- 
2.25.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH v4 08/20] arm: Convert to GENERIC_CMDLINE
Date: Fri,  2 Apr 2021 15:18:09 +0000 (UTC)	[thread overview]
Message-ID: <2e49b9ae60a90aec8b555946279cab059a2812a4.1617375802.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1617375802.git.christophe.leroy@csgroup.eu>

This converts the architecture to GENERIC_CMDLINE.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4:
- Removed dependency to ATAGS
- Removed the message when forcing
---
 arch/arm/Kconfig              | 38 +----------------------------------
 arch/arm/kernel/atags_parse.c | 13 +++---------
 2 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5da96f5df48f..1a1808b0eef7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@ config ARM
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+	select GENERIC_CMDLINE
 	select GENERIC_IRQ_IPI if SMP
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_EARLY_IOREMAP
@@ -1740,43 +1741,6 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND
 
 endchoice
 
-config CMDLINE
-	string "Default kernel command string"
-	default ""
-	help
-	  On some architectures (e.g. CATS), there is currently no way
-	  for the boot loader to pass arguments to the kernel. For these
-	  architectures, you should supply some command-line options at build
-	  time by entering them here. As a minimum, you should specify the
-	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-choice
-	prompt "Kernel command line type" if CMDLINE != ""
-	default CMDLINE_FROM_BOOTLOADER
-	depends on ATAGS
-
-config CMDLINE_FROM_BOOTLOADER
-	bool "Use bootloader kernel arguments if available"
-	help
-	  Uses the command-line options passed by the boot loader. If
-	  the boot loader doesn't provide any, the default kernel command
-	  string provided in CMDLINE will be used.
-
-config CMDLINE_EXTEND
-	bool "Extend bootloader kernel arguments"
-	help
-	  The command-line arguments provided by the boot loader will be
-	  appended to the default kernel command string.
-
-config CMDLINE_FORCE
-	bool "Always use the default kernel command string"
-	help
-	  Always use the default kernel command string, even if the boot
-	  loader passes other arguments to the kernel.
-	  This is useful if you cannot or don't want to change the
-	  command-line options your boot loader passes to the kernel.
-endchoice
-
 config XIP_KERNEL
 	bool "Kernel Execute-In-Place from ROM"
 	depends on !ARM_LPAE && !ARCH_MULTIPLATFORM
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 373b61f9a4f0..ef97ec015c51 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -14,6 +14,7 @@
  * is not parsed in any way).
  */
 
+#include <linux/cmdline.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
 #include <linux/kernel.h>
@@ -120,16 +121,8 @@ __tagtable(ATAG_REVISION, parse_tag_revision);
 
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
-#if defined(CONFIG_CMDLINE_EXTEND)
-	strlcat(default_command_line, " ", COMMAND_LINE_SIZE);
-	strlcat(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#elif defined(CONFIG_CMDLINE_FORCE)
-	pr_warn("Ignoring tag cmdline (using the default kernel command line)\n");
-#else
-	strlcpy(default_command_line, tag->u.cmdline.cmdline,
-		COMMAND_LINE_SIZE);
-#endif
+	cmdline_build(default_command_line, tag->u.cmdline.cmdline);
+
 	return 0;
 }
 
-- 
2.25.0


  parent reply	other threads:[~2021-04-02 15:18 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 15:18 [PATCH v4 00/20] Implement GENERIC_CMDLINE Christophe Leroy
2021-04-02 15:18 ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18 ` Christophe Leroy
2021-04-02 15:18 ` Christophe Leroy
2021-04-02 15:18 ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 01/20] cmdline: Add generic function to build command line Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 02/20] drivers: of: use cmdline building function Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 03/20] x86/efi: Replace CONFIG_CMDLINE_OVERRIDE by CONFIG_CMDLINE_FORCE Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 04/20] drivers: firmware: efi: use cmdline building function Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 05/20] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 06/20] powerpc: convert strcpy to strlcpy in prom_init Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 07/20] powerpc: Convert to GENERIC_CMDLINE Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` Christophe Leroy [this message]
2021-04-02 15:18   ` [OpenRISC] [PATCH v4 08/20] arm: " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 09/20] arm64: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 10/20] hexagon: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 11/20] microblaze: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 12/20] nios2: " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 13/20] openrisc: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 14/20] riscv: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 15/20] sh: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 16/20] sparc: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 17/20] xtensa: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 18/20] x86: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-08 19:41   ` Rob Herring
2021-04-08 19:41     ` [OpenRISC] " Rob Herring
2021-04-08 19:41     ` Rob Herring
2021-04-08 19:41     ` Rob Herring
2021-04-08 19:41     ` Rob Herring
2021-04-09 10:20     ` Christophe Leroy
2021-04-09 10:20       ` Christophe Leroy
2021-04-09 10:20       ` [OpenRISC] " Christophe Leroy
2021-04-09 10:20       ` Christophe Leroy
2021-04-09 10:20       ` Christophe Leroy
2021-04-09 10:20       ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 19/20] mips: " Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-06 17:38   ` Daniel Walker
2021-04-06 17:38     ` [OpenRISC] " Daniel Walker
2021-04-06 17:38     ` Daniel Walker
2021-04-06 17:38     ` Daniel Walker
2021-04-06 17:38     ` Daniel Walker
2021-04-08 19:04     ` Rob Herring
2021-04-08 19:04       ` [OpenRISC] " Rob Herring
2021-04-08 19:04       ` Rob Herring
2021-04-08 19:04       ` Rob Herring
2021-04-08 19:04       ` Rob Herring
2021-04-09  1:23       ` Daniel Walker
2021-04-09  1:23         ` [OpenRISC] " Daniel Walker
2021-04-09  1:23         ` Daniel Walker
2021-04-09  1:23         ` Daniel Walker
2021-04-09  1:23         ` Daniel Walker
2021-04-20 16:05         ` Christophe Leroy
2021-04-20 16:05           ` [OpenRISC] " Christophe Leroy
2021-04-20 16:05           ` Christophe Leroy
2021-04-20 16:05           ` Christophe Leroy
2021-04-20 16:05           ` Christophe Leroy
2021-04-02 15:18 ` [PATCH v4 20/20] cmdline: Remove CONFIG_CMDLINE_EXTEND Christophe Leroy
2021-04-02 15:18   ` [OpenRISC] " Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-02 15:18   ` Christophe Leroy
2021-04-06 16:56 ` [PATCH v4 00/20] Implement GENERIC_CMDLINE Daniel Walker
2021-04-06 16:56   ` Daniel Walker
2021-04-06 16:56   ` [OpenRISC] " Daniel Walker
2021-04-06 16:56   ` Daniel Walker
2021-04-06 16:56   ` Daniel Walker
2021-04-06 16:56   ` Daniel Walker

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=2e49b9ae60a90aec8b555946279cab059a2812a4.1617375802.git.christophe.leroy@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@kernel.org \
    --cc=daniel@gimpelevich.san-francisco.ca.us \
    --cc=danielwa@cisco.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ley.foon.tan@intel.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=monstr@monstr.eu \
    --cc=openrisc@lists.librecores.org \
    --cc=robh@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.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.