diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 57 |
1 files changed, 34 insertions, 23 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 5821365b9605..6d850bf0a517 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -75,6 +75,10 @@ | |||
75 | #include <scsi/sg.h> | 75 | #include <scsi/sg.h> |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #ifdef CONFIG_LOCKUP_DETECTOR | ||
79 | #include <linux/nmi.h> | ||
80 | #endif | ||
81 | |||
78 | 82 | ||
79 | #if defined(CONFIG_SYSCTL) | 83 | #if defined(CONFIG_SYSCTL) |
80 | 84 | ||
@@ -105,7 +109,7 @@ extern int blk_iopoll_enabled; | |||
105 | #endif | 109 | #endif |
106 | 110 | ||
107 | /* Constants used for minimum and maximum */ | 111 | /* Constants used for minimum and maximum */ |
108 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 112 | #ifdef CONFIG_LOCKUP_DETECTOR |
109 | static int sixty = 60; | 113 | static int sixty = 60; |
110 | static int neg_one = -1; | 114 | static int neg_one = -1; |
111 | #endif | 115 | #endif |
@@ -561,7 +565,7 @@ static struct ctl_table kern_table[] = { | |||
561 | .extra2 = &one, | 565 | .extra2 = &one, |
562 | }, | 566 | }, |
563 | #endif | 567 | #endif |
564 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 568 | #ifdef CONFIG_HOTPLUG |
565 | { | 569 | { |
566 | .procname = "hotplug", | 570 | .procname = "hotplug", |
567 | .data = &uevent_helper, | 571 | .data = &uevent_helper, |
@@ -709,7 +713,34 @@ static struct ctl_table kern_table[] = { | |||
709 | .mode = 0444, | 713 | .mode = 0444, |
710 | .proc_handler = proc_dointvec, | 714 | .proc_handler = proc_dointvec, |
711 | }, | 715 | }, |
712 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | 716 | #if defined(CONFIG_LOCKUP_DETECTOR) |
717 | { | ||
718 | .procname = "watchdog", | ||
719 | .data = &watchdog_enabled, | ||
720 | .maxlen = sizeof (int), | ||
721 | .mode = 0644, | ||
722 | .proc_handler = proc_dowatchdog_enabled, | ||
723 | }, | ||
724 | { | ||
725 | .procname = "watchdog_thresh", | ||
726 | .data = &softlockup_thresh, | ||
727 | .maxlen = sizeof(int), | ||
728 | .mode = 0644, | ||
729 | .proc_handler = proc_dowatchdog_thresh, | ||
730 | .extra1 = &neg_one, | ||
731 | .extra2 = &sixty, | ||
732 | }, | ||
733 | { | ||
734 | .procname = "softlockup_panic", | ||
735 | .data = &softlockup_panic, | ||
736 | .maxlen = sizeof(int), | ||
737 | .mode = 0644, | ||
738 | .proc_handler = proc_dointvec_minmax, | ||
739 | .extra1 = &zero, | ||
740 | .extra2 = &one, | ||
741 | }, | ||
742 | #endif | ||
743 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) && !defined(CONFIG_LOCKUP_DETECTOR) | ||
713 | { | 744 | { |
714 | .procname = "unknown_nmi_panic", | 745 | .procname = "unknown_nmi_panic", |
715 | .data = &unknown_nmi_panic, | 746 | .data = &unknown_nmi_panic, |
@@ -812,26 +843,6 @@ static struct ctl_table kern_table[] = { | |||
812 | .proc_handler = proc_dointvec, | 843 | .proc_handler = proc_dointvec, |
813 | }, | 844 | }, |
814 | #endif | 845 | #endif |
815 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
816 | { | ||
817 | .procname = "softlockup_panic", | ||
818 | .data = &softlockup_panic, | ||
819 | .maxlen = sizeof(int), | ||
820 | .mode = 0644, | ||
821 | .proc_handler = proc_dointvec_minmax, | ||
822 | .extra1 = &zero, | ||
823 | .extra2 = &one, | ||
824 | }, | ||
825 | { | ||
826 | .procname = "softlockup_thresh", | ||
827 | .data = &softlockup_thresh, | ||
828 | .maxlen = sizeof(int), | ||
829 | .mode = 0644, | ||
830 | .proc_handler = proc_dosoftlockup_thresh, | ||
831 | .extra1 = &neg_one, | ||
832 | .extra2 = &sixty, | ||
833 | }, | ||
834 | #endif | ||
835 | #ifdef CONFIG_DETECT_HUNG_TASK | 846 | #ifdef CONFIG_DETECT_HUNG_TASK |
836 | { | 847 | { |
837 | .procname = "hung_task_panic", | 848 | .procname = "hung_task_panic", |