Skip to content

Commit 20de8f8

Browse files
JoelgranadosVasily Gorbik
authored andcommitted
s390: Move s390 sysctls into their own file under arch/s390
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 <[email protected]> Acked-by: Heiko Carstens <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 5983ab1 commit 20de8f8

File tree

3 files changed

+35
-18
lines changed

3 files changed

+35
-18
lines changed

arch/s390/lib/spinlock.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/export.h>
1111
#include <linux/spinlock.h>
1212
#include <linux/jiffies.h>
13+
#include <linux/sysctl.h>
1314
#include <linux/init.h>
1415
#include <linux/smp.h>
1516
#include <linux/percpu.h>
@@ -38,6 +39,23 @@ static int __init spin_retry_setup(char *str)
3839
}
3940
__setup("spin_retry=", spin_retry_setup);
4041

42+
static const struct ctl_table s390_spin_sysctl_table[] = {
43+
{
44+
.procname = "spin_retry",
45+
.data = &spin_retry,
46+
.maxlen = sizeof(int),
47+
.mode = 0644,
48+
.proc_handler = proc_dointvec,
49+
},
50+
};
51+
52+
static int __init init_s390_spin_sysctls(void)
53+
{
54+
register_sysctl_init("kernel", s390_spin_sysctl_table);
55+
return 0;
56+
}
57+
arch_initcall(init_s390_spin_sysctls);
58+
4159
struct spin_wait {
4260
struct spin_wait *next, *prev;
4361
int node_id;

arch/s390/mm/fault.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,23 @@ static void dump_fault_info(struct pt_regs *regs)
165165

166166
int show_unhandled_signals = 1;
167167

168+
static const struct ctl_table s390_fault_sysctl_table[] = {
169+
{
170+
.procname = "userprocess_debug",
171+
.data = &show_unhandled_signals,
172+
.maxlen = sizeof(int),
173+
.mode = 0644,
174+
.proc_handler = proc_dointvec,
175+
},
176+
};
177+
178+
static int __init init_s390_fault_sysctls(void)
179+
{
180+
register_sysctl_init("kernel", s390_fault_sysctl_table);
181+
return 0;
182+
}
183+
arch_initcall(init_s390_fault_sysctls);
184+
168185
void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault)
169186
{
170187
static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);

kernel/sysctl.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,15 +1794,6 @@ static const struct ctl_table kern_table[] = {
17941794
.extra1 = SYSCTL_ZERO,
17951795
.extra2 = SYSCTL_MAXOLDUID,
17961796
},
1797-
#ifdef CONFIG_S390
1798-
{
1799-
.procname = "userprocess_debug",
1800-
.data = &show_unhandled_signals,
1801-
.maxlen = sizeof(int),
1802-
.mode = 0644,
1803-
.proc_handler = proc_dointvec,
1804-
},
1805-
#endif
18061797
{
18071798
.procname = "panic_on_oops",
18081799
.data = &panic_on_oops,
@@ -1897,15 +1888,6 @@ static const struct ctl_table kern_table[] = {
18971888
.proc_handler = proc_dointvec,
18981889
},
18991890
#endif
1900-
#if defined(CONFIG_S390) && defined(CONFIG_SMP)
1901-
{
1902-
.procname = "spin_retry",
1903-
.data = &spin_retry,
1904-
.maxlen = sizeof (int),
1905-
.mode = 0644,
1906-
.proc_handler = proc_dointvec,
1907-
},
1908-
#endif
19091891
#if defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86)
19101892
{
19111893
.procname = "acpi_video_flags",

0 commit comments

Comments
 (0)