[PATCH v2] x86/split_lock: Don't warn about unknown parameter

Ronan Pigott posted 1 patch 2 months, 1 week ago
arch/x86/kernel/cpu/bus_lock.c | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH v2] x86/split_lock: Don't warn about unknown parameter
Posted by Ronan Pigott 2 months, 1 week ago
The split_lock_detect command line parameter is handled in sld_setup()
shortly after cpu_parse_early_param() but still before
parse_early_param().

Add a dummy __setup function so that parse_early_param() doesn't later
complain about the "unknown" parameter split_lock_detect=, and pass it
along to init.

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
---
Changes in v2:

 - Added parens for function names in commit message
 - Added my S-o-b

---
 arch/x86/kernel/cpu/bus_lock.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/x86/kernel/cpu/bus_lock.c b/arch/x86/kernel/cpu/bus_lock.c
index fb166662bc0d..c8fec79ed557 100644
--- a/arch/x86/kernel/cpu/bus_lock.c
+++ b/arch/x86/kernel/cpu/bus_lock.c
@@ -132,6 +132,12 @@ static void __init sld_state_setup(void)
 	sld_state = state;
 }
 
+static __init int setup_split_lock_detect(char *arg)
+{
+	return 1;
+}
+__setup("split_lock_detect=", setup_split_lock_detect);
+
 static void __init __split_lock_setup(void)
 {
 	if (!split_lock_verify_msr(false)) {
-- 
2.53.0
[tip: x86/cleanups] x86/split_lock: Don't warn about unknown split_lock_detect parameter
Posted by tip-bot2 for Ronan Pigott 2 months, 1 week ago
The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     fbe80bd6993a059ca366a3561051b419f3cd2b29
Gitweb:        https://git.kernel.org/tip/fbe80bd6993a059ca366a3561051b419f3cd2b29
Author:        Ronan Pigott <ronan@rjp.ie>
AuthorDate:    Sun, 05 Apr 2026 10:28:25 -07:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Sun, 05 Apr 2026 23:12:40 +02:00

x86/split_lock: Don't warn about unknown split_lock_detect parameter

The split_lock_detect command line parameter is handled in sld_setup() shortly
after cpu_parse_early_param() but still before parse_early_param().

Add a dummy parsing function so that parse_early_param() doesn't later
complain about the "unknown" parameter split_lock_detect=, and pass it along
to init.

  [ bp: Massage commit message. ]

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260405181807.3906-1-ronan@rjp.ie
---
 arch/x86/kernel/cpu/bus_lock.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/x86/kernel/cpu/bus_lock.c b/arch/x86/kernel/cpu/bus_lock.c
index 660aa9a..bba2860 100644
--- a/arch/x86/kernel/cpu/bus_lock.c
+++ b/arch/x86/kernel/cpu/bus_lock.c
@@ -132,6 +132,12 @@ static void __init sld_state_setup(void)
 	sld_state = state;
 }
 
+static __init int setup_split_lock_detect(char *arg)
+{
+	return 1;
+}
+__setup("split_lock_detect=", setup_split_lock_detect);
+
 static void __init __split_lock_setup(void)
 {
 	if (!split_lock_verify_msr(false)) {