Thread (16 messages) flat view 16 messages, 4 authors, 2025-03-06

Re: [PATCH 7/8] s390: mv s390 sysctls into their own file under arch/s390 dir

From: Heiko Carstens <hca@linux.ibm.com>
Date: 2025-02-18 14:09:25
Also in: linux-acpi, linux-fsdevel, linux-perf-users, linux-s390, lkml, sparclinux

On Tue, Feb 18, 2025 at 10:56:23AM +0100, joel granados wrote:
Move s390 sysctls (spin_retry and userprocess_debug) into their own
files under arch/s390. We create two new sysctl tables
(2390_{fault,spin}_sysctl_table) which will be initialized with
arch_initcall placing them after their original place in proc_root_init.

This is part of a greater effort to move ctl tables into their
respective subsystems which will reduce the merge conflicts in
kerenel/sysctl.c.
  ^^^^^^^
typo
quoted hunk ↗ jump to hunk
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index a81a01c44927..4483fdc9d472 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -17,6 +17,10 @@
 #include <asm/alternative.h>
 #include <asm/asm.h>
 
+#if defined(CONFIG_SMP)
+#include <linux/sysctl.h>
+#endif
+
...
+#if defined(CONFIG_SMP)
+static const struct ctl_table s390_spin_sysctl_table[] = {
+	{
+		.procname	= "spin_retry",
+		.data		= &spin_retry,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec,
+	},
+};
+
+static int __init init_s390_spin_sysctls(void)
+{
+	register_sysctl_init("kernel", s390_spin_sysctl_table);
+	return 0;
+}
+arch_initcall(init_s390_spin_sysctls);
+#endif
I see that you want to keep the existing CONFIG_SMP behaviour, but since a
long time s390 enforces CONFIG_SMP=y (this was obviously never reflected in
kernel/sysctl.c).
Therefore the above ifdefs should be removed, and in addition the include
statement should be added to the other linux includes at the top of the file.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help