Skip to content

Commit b6522fa

Browse files
nixiaominghdeller
authored andcommitted
parisc: add sysctl file interface panic_on_stackoverflow
The variable sysctl_panic_on_stackoverflow is used in arch/parisc/kernel/irq.c and arch/x86/kernel/irq_32.c, but the sysctl file interface panic_on_stackoverflow only exists on x86. Add sysctl file interface panic_on_stackoverflow for parisc Signed-off-by: Xiaoming Ni <[email protected]> Reviewed-by: Luis Chamberlain <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 3fd84a4 commit b6522fa

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

kernel/sysctl.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -994,30 +994,32 @@ static struct ctl_table kern_table[] = {
994994
.proc_handler = proc_dointvec,
995995
},
996996
#endif
997-
#if defined(CONFIG_X86)
997+
998+
#if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \
999+
defined(CONFIG_DEBUG_STACKOVERFLOW)
9981000
{
999-
.procname = "panic_on_unrecovered_nmi",
1000-
.data = &panic_on_unrecovered_nmi,
1001+
.procname = "panic_on_stackoverflow",
1002+
.data = &sysctl_panic_on_stackoverflow,
10011003
.maxlen = sizeof(int),
10021004
.mode = 0644,
10031005
.proc_handler = proc_dointvec,
10041006
},
1007+
#endif
1008+
#if defined(CONFIG_X86)
10051009
{
1006-
.procname = "panic_on_io_nmi",
1007-
.data = &panic_on_io_nmi,
1010+
.procname = "panic_on_unrecovered_nmi",
1011+
.data = &panic_on_unrecovered_nmi,
10081012
.maxlen = sizeof(int),
10091013
.mode = 0644,
10101014
.proc_handler = proc_dointvec,
10111015
},
1012-
#ifdef CONFIG_DEBUG_STACKOVERFLOW
10131016
{
1014-
.procname = "panic_on_stackoverflow",
1015-
.data = &sysctl_panic_on_stackoverflow,
1017+
.procname = "panic_on_io_nmi",
1018+
.data = &panic_on_io_nmi,
10161019
.maxlen = sizeof(int),
10171020
.mode = 0644,
10181021
.proc_handler = proc_dointvec,
10191022
},
1020-
#endif
10211023
{
10221024
.procname = "bootloader_type",
10231025
.data = &bootloader_type,

0 commit comments

Comments
 (0)