]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390: Move s390 sysctls into their own file under arch/s390
authorjoel granados <joel.granados@kernel.org>
Thu, 6 Mar 2025 11:29:46 +0000 (12:29 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 18 Mar 2025 16:13:04 +0000 (17:13 +0100)
Move s390 sysctls (spin_retry and userprocess_debug) into their own
files under arch/s390. 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
kernel/sysctl.c.

Signed-off-by: joel granados <joel.granados@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20250306-jag-mv_ctltables-v2-6-71b243c8d3f8@kernel.org
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/lib/spinlock.c
arch/s390/mm/fault.c
kernel/sysctl.c

index 9d5669d449f28cf3c2b6f4fabf9f5875b4c2aaf9..0c895c869ebd188fb3c518f3fe820f58d5cad4a7 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/export.h>
 #include <linux/spinlock.h>
 #include <linux/jiffies.h>
+#include <linux/sysctl.h>
 #include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/percpu.h>
@@ -38,6 +39,23 @@ static int __init spin_retry_setup(char *str)
 }
 __setup("spin_retry=", spin_retry_setup);
 
+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);
+
 struct spin_wait {
        struct spin_wait *next, *prev;
        int node_id;
index 13d8c44bf8ede77b293f8aabd3de96ac5b653915..31a763e05287f7ceeeccf54676d2762cf8abfc27 100644 (file)
@@ -165,6 +165,23 @@ static void dump_fault_info(struct pt_regs *regs)
 
 int show_unhandled_signals = 1;
 
+static const struct ctl_table s390_fault_sysctl_table[] = {
+       {
+               .procname       = "userprocess_debug",
+               .data           = &show_unhandled_signals,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+};
+
+static int __init init_s390_fault_sysctls(void)
+{
+       register_sysctl_init("kernel", s390_fault_sysctl_table);
+       return 0;
+}
+arch_initcall(init_s390_fault_sysctls);
+
 void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault)
 {
        static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);
index cb57da499ebb1216cefb3705694ab62028fee03e..6c70fb3b2376f672044bd05660c42e4b47003f85 100644 (file)
@@ -1794,15 +1794,6 @@ static const struct ctl_table kern_table[] = {
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_MAXOLDUID,
        },
-#ifdef CONFIG_S390
-       {
-               .procname       = "userprocess_debug",
-               .data           = &show_unhandled_signals,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-#endif
        {
                .procname       = "panic_on_oops",
                .data           = &panic_on_oops,
@@ -1897,15 +1888,6 @@ static const struct ctl_table kern_table[] = {
                .proc_handler   = proc_dointvec,
        },
 #endif
-#if defined(CONFIG_S390) && defined(CONFIG_SMP)
-       {
-               .procname       = "spin_retry",
-               .data           = &spin_retry,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-#endif
 #if    defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86)
        {
                .procname       = "acpi_video_flags",