From: Daniel Walker <danielwa@cisco.com>
To: Will Deacon <will@kernel.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Rob Herring <robh@kernel.org>,
Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>,
Andrew Morton <akpm@linux-foundation.org>,
x86@kernel.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org,
Catalin Marinas <catalin.marinas@arm.com>
Cc: xe-linux-external@cisco.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line
Date: Thu, 15 Apr 2021 21:09:19 -0700 [thread overview]
Message-ID: <20210416040924.2882771-9-danielwa@cisco.com> (raw)
In-Reply-To: <20210416040924.2882771-1-danielwa@cisco.com>
This removes arm64 from the device tree handling of the
command line arguments.
The boot_command_line variable is populated inside the earliest
user of the command line, which is in idreg-override.c.
The device tree should not be needed to do any further handling
of the boot command line options.
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <danielwa@cisco.com>
---
arch/arm64/Kconfig | 33 +-----------------------------
arch/arm64/include/asm/setup.h | 2 ++
arch/arm64/kernel/idreg-override.c | 9 ++++----
3 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e4e1b6550115..9781ba3758b1 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -105,6 +105,7 @@ config ARM64
select GENERIC_ALLOCATOR
select GENERIC_ARCH_TOPOLOGY
select GENERIC_CLOCKEVENTS_BROADCAST
+ select GENERIC_CMDLINE
select GENERIC_CPU_AUTOPROBE
select GENERIC_CPU_VULNERABILITIES
select GENERIC_EARLY_IOREMAP
@@ -1841,38 +1842,6 @@ config ARM64_ACPI_PARKING_PROTOCOL
protocol even if the corresponding data is present in the ACPI
MADT table.
-config CMDLINE
- string "Default kernel command string"
- default ""
- help
- Provide a set of default command-line options at build time by
- entering them here. As a minimum, you should specify the the
- root device (e.g. root=/dev/nfs).
-
-choice
- prompt "Kernel command line type" if CMDLINE != ""
- default CMDLINE_FROM_BOOTLOADER
- help
- Choose how the kernel will handle the provided default kernel
- command line string.
-
-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_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 EFI_STUB
bool
diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h
index d3320618ed14..1f5b6d8f2433 100644
--- a/arch/arm64/include/asm/setup.h
+++ b/arch/arm64/include/asm/setup.h
@@ -5,7 +5,9 @@
#include <uapi/asm/setup.h>
+#ifndef __ASSEMBLY__
void *get_early_fdt_ptr(void);
void early_fdt_map(u64 dt_phys);
+#endif /* __ASSEMBLY__ */
#endif
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
index 83f1c4b92095..0a3fcae13043 100644
--- a/arch/arm64/kernel/idreg-override.c
+++ b/arch/arm64/kernel/idreg-override.c
@@ -9,6 +9,7 @@
#include <linux/ctype.h>
#include <linux/kernel.h>
#include <linux/libfdt.h>
+#include <linux/cmdline.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>
@@ -188,11 +189,11 @@ static __init void parse_cmdline(void)
{
const u8 *prop = get_bootargs_cmdline();
- if (IS_ENABLED(CONFIG_CMDLINE_FORCE) || !prop)
- __parse_cmdline(CONFIG_CMDLINE, true);
+ strscpy(boot_command_line, prop, COMMAND_LINE_SIZE);
+ cmdline_add_builtin(boot_command_line);
+
+ __parse_cmdline(boot_command_line, true);
- if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop)
- __parse_cmdline(prop, true);
}
/* Keep checkers quiet */
--
2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Walker <danielwa@cisco.com>
To: Will Deacon <will@kernel.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Rob Herring <robh@kernel.org>,
Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>,
Andrew Morton <akpm@linux-foundation.org>,
x86@kernel.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org,
Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
xe-linux-external@cisco.com
Subject: [PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line
Date: Thu, 15 Apr 2021 21:09:19 -0700 [thread overview]
Message-ID: <20210416040924.2882771-9-danielwa@cisco.com> (raw)
In-Reply-To: <20210416040924.2882771-1-danielwa@cisco.com>
This removes arm64 from the device tree handling of the
command line arguments.
The boot_command_line variable is populated inside the earliest
user of the command line, which is in idreg-override.c.
The device tree should not be needed to do any further handling
of the boot command line options.
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <danielwa@cisco.com>
---
arch/arm64/Kconfig | 33 +-----------------------------
arch/arm64/include/asm/setup.h | 2 ++
arch/arm64/kernel/idreg-override.c | 9 ++++----
3 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e4e1b6550115..9781ba3758b1 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -105,6 +105,7 @@ config ARM64
select GENERIC_ALLOCATOR
select GENERIC_ARCH_TOPOLOGY
select GENERIC_CLOCKEVENTS_BROADCAST
+ select GENERIC_CMDLINE
select GENERIC_CPU_AUTOPROBE
select GENERIC_CPU_VULNERABILITIES
select GENERIC_EARLY_IOREMAP
@@ -1841,38 +1842,6 @@ config ARM64_ACPI_PARKING_PROTOCOL
protocol even if the corresponding data is present in the ACPI
MADT table.
-config CMDLINE
- string "Default kernel command string"
- default ""
- help
- Provide a set of default command-line options at build time by
- entering them here. As a minimum, you should specify the the
- root device (e.g. root=/dev/nfs).
-
-choice
- prompt "Kernel command line type" if CMDLINE != ""
- default CMDLINE_FROM_BOOTLOADER
- help
- Choose how the kernel will handle the provided default kernel
- command line string.
-
-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_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 EFI_STUB
bool
diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h
index d3320618ed14..1f5b6d8f2433 100644
--- a/arch/arm64/include/asm/setup.h
+++ b/arch/arm64/include/asm/setup.h
@@ -5,7 +5,9 @@
#include <uapi/asm/setup.h>
+#ifndef __ASSEMBLY__
void *get_early_fdt_ptr(void);
void early_fdt_map(u64 dt_phys);
+#endif /* __ASSEMBLY__ */
#endif
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
index 83f1c4b92095..0a3fcae13043 100644
--- a/arch/arm64/kernel/idreg-override.c
+++ b/arch/arm64/kernel/idreg-override.c
@@ -9,6 +9,7 @@
#include <linux/ctype.h>
#include <linux/kernel.h>
#include <linux/libfdt.h>
+#include <linux/cmdline.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>
@@ -188,11 +189,11 @@ static __init void parse_cmdline(void)
{
const u8 *prop = get_bootargs_cmdline();
- if (IS_ENABLED(CONFIG_CMDLINE_FORCE) || !prop)
- __parse_cmdline(CONFIG_CMDLINE, true);
+ strscpy(boot_command_line, prop, COMMAND_LINE_SIZE);
+ cmdline_add_builtin(boot_command_line);
+
+ __parse_cmdline(boot_command_line, true);
- if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop)
- __parse_cmdline(prop, true);
}
/* Keep checkers quiet */
--
2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Walker <danielwa@cisco.com>
To: Will Deacon <will@kernel.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Rob Herring <robh@kernel.org>,
Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>,
Andrew Morton <akpm@linux-foundation.org>,
x86@kernel.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org,
Catalin Marinas <catalin.marinas@arm.com>
Cc: xe-linux-external@cisco.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line
Date: Thu, 15 Apr 2021 21:09:19 -0700 [thread overview]
Message-ID: <20210416040924.2882771-9-danielwa@cisco.com> (raw)
In-Reply-To: <20210416040924.2882771-1-danielwa@cisco.com>
This removes arm64 from the device tree handling of the
command line arguments.
The boot_command_line variable is populated inside the earliest
user of the command line, which is in idreg-override.c.
The device tree should not be needed to do any further handling
of the boot command line options.
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <danielwa@cisco.com>
---
arch/arm64/Kconfig | 33 +-----------------------------
arch/arm64/include/asm/setup.h | 2 ++
arch/arm64/kernel/idreg-override.c | 9 ++++----
3 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e4e1b6550115..9781ba3758b1 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -105,6 +105,7 @@ config ARM64
select GENERIC_ALLOCATOR
select GENERIC_ARCH_TOPOLOGY
select GENERIC_CLOCKEVENTS_BROADCAST
+ select GENERIC_CMDLINE
select GENERIC_CPU_AUTOPROBE
select GENERIC_CPU_VULNERABILITIES
select GENERIC_EARLY_IOREMAP
@@ -1841,38 +1842,6 @@ config ARM64_ACPI_PARKING_PROTOCOL
protocol even if the corresponding data is present in the ACPI
MADT table.
-config CMDLINE
- string "Default kernel command string"
- default ""
- help
- Provide a set of default command-line options at build time by
- entering them here. As a minimum, you should specify the the
- root device (e.g. root=/dev/nfs).
-
-choice
- prompt "Kernel command line type" if CMDLINE != ""
- default CMDLINE_FROM_BOOTLOADER
- help
- Choose how the kernel will handle the provided default kernel
- command line string.
-
-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_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 EFI_STUB
bool
diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h
index d3320618ed14..1f5b6d8f2433 100644
--- a/arch/arm64/include/asm/setup.h
+++ b/arch/arm64/include/asm/setup.h
@@ -5,7 +5,9 @@
#include <uapi/asm/setup.h>
+#ifndef __ASSEMBLY__
void *get_early_fdt_ptr(void);
void early_fdt_map(u64 dt_phys);
+#endif /* __ASSEMBLY__ */
#endif
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
index 83f1c4b92095..0a3fcae13043 100644
--- a/arch/arm64/kernel/idreg-override.c
+++ b/arch/arm64/kernel/idreg-override.c
@@ -9,6 +9,7 @@
#include <linux/ctype.h>
#include <linux/kernel.h>
#include <linux/libfdt.h>
+#include <linux/cmdline.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>
@@ -188,11 +189,11 @@ static __init void parse_cmdline(void)
{
const u8 *prop = get_bootargs_cmdline();
- if (IS_ENABLED(CONFIG_CMDLINE_FORCE) || !prop)
- __parse_cmdline(CONFIG_CMDLINE, true);
+ strscpy(boot_command_line, prop, COMMAND_LINE_SIZE);
+ cmdline_add_builtin(boot_command_line);
+
+ __parse_cmdline(boot_command_line, true);
- if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop)
- __parse_cmdline(prop, true);
}
/* Keep checkers quiet */
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-04-16 4:09 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 4:09 [PATCH 0/8] generic command line v4 Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 1/8] CMDLINE: add generic builtin command line Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 2/8] scripts: insert-sys-cert: add command line insert capability Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 4/8] CMDLINE: mips: convert to generic builtin command line Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 5/8] drivers: firmware: efi: libstub: enable generic commandline Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 6/8] CMDLINE: x86: convert to generic builtin command line Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` [PATCH 7/8] of: allow sending a NULL value to early_init_dt_scan_chosen Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2021-04-16 4:09 ` Daniel Walker [this message]
2021-04-16 4:09 ` [PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line Daniel Walker
2021-04-16 4:09 ` Daniel Walker
2022-09-22 20:45 ` [PATCH 0/8] generic command line v4 Sean Anderson
2022-09-22 20:45 ` Sean Anderson
2022-09-22 20:53 ` Daniel Walker
2022-09-22 20:53 ` Daniel Walker
2022-09-22 20:53 ` Daniel Walker
2022-09-22 21:03 ` Sean Anderson
2022-09-22 21:03 ` Sean Anderson
2022-09-22 21:03 ` Sean Anderson
2022-09-22 21:10 ` Daniel Walker
2022-09-22 21:10 ` Daniel Walker
2022-09-22 21:10 ` Daniel Walker
2022-09-22 21:15 ` Daniel Gimpelevich
2022-09-22 21:15 ` Daniel Gimpelevich
2022-09-22 21:15 ` Daniel Gimpelevich
2022-09-26 22:52 ` Rob Herring
2022-09-26 22:52 ` Rob Herring
2022-09-26 22:52 ` Rob Herring
2022-09-26 23:03 ` Daniel Walker
2022-09-26 23:03 ` Daniel Walker
2022-09-26 23:03 ` Daniel Walker
2022-09-26 22:59 ` Daniel Walker
2022-09-26 22:59 ` Daniel Walker
2022-09-26 22:59 ` Daniel Walker
-- strict thread matches above, loose matches on Subject: below --
2023-11-10 1:38 [PATCH 0/8] generic command line v6 Daniel Walker
2023-11-10 1:38 ` [PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line Daniel Walker
2023-11-10 1:38 ` Daniel Walker
2023-11-10 1:38 ` Daniel Walker
2023-11-23 6:39 ` Christophe Leroy
2023-11-23 6:39 ` Christophe Leroy
2023-11-23 6:39 ` Christophe Leroy
2022-09-29 2:32 [PATCH 0/8] generic command line v5 Daniel Walker
2022-09-29 2:32 ` [PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line Daniel Walker
2022-09-29 2:32 ` Daniel Walker
2021-03-30 17:56 [PATCH 1/8] CMDLINE: add " Daniel Walker
2021-03-30 17:57 ` [PATCH 8/8] CMDLINE: arm64: convert to " Daniel Walker
2021-03-30 17:57 ` Daniel Walker
2021-03-30 17:57 ` 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=20210416040924.2882771-9-danielwa@cisco.com \
--to=danielwa@cisco.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=daniel@gimpelevich.san-francisco.ca.us \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=robh@kernel.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=xe-linux-external@cisco.com \
/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.