diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/nmi.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 28065d0b71a9..6241e4448cab 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -847,7 +847,7 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | |||
847 | } | 847 | } |
848 | 848 | ||
849 | /* | 849 | /* |
850 | * proc handler for /proc/sys/kernel/nmi_watchdog | 850 | * proc handler for /proc/sys/kernel/nmi |
851 | */ | 851 | */ |
852 | int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | 852 | int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, |
853 | void __user *buffer, size_t *length, loff_t *ppos) | 853 | void __user *buffer, size_t *length, loff_t *ppos) |
@@ -861,8 +861,8 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
861 | return 0; | 861 | return 0; |
862 | 862 | ||
863 | if (atomic_read(&nmi_active) < 0) { | 863 | if (atomic_read(&nmi_active) < 0) { |
864 | printk(KERN_WARNING "NMI watchdog is permanently disabled\n"); | 864 | printk( KERN_WARNING "NMI watchdog is permanently disabled\n"); |
865 | return -EINVAL; | 865 | return -EIO; |
866 | } | 866 | } |
867 | 867 | ||
868 | if (nmi_watchdog == NMI_DEFAULT) { | 868 | if (nmi_watchdog == NMI_DEFAULT) { |
@@ -872,24 +872,11 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
872 | nmi_watchdog = NMI_IO_APIC; | 872 | nmi_watchdog = NMI_IO_APIC; |
873 | } | 873 | } |
874 | 874 | ||
875 | if (nmi_watchdog == NMI_LOCAL_APIC) | 875 | if (nmi_watchdog == NMI_LOCAL_APIC) { |
876 | { | ||
877 | if (nmi_watchdog_enabled) | 876 | if (nmi_watchdog_enabled) |
878 | enable_lapic_nmi_watchdog(); | 877 | enable_lapic_nmi_watchdog(); |
879 | else | 878 | else |
880 | disable_lapic_nmi_watchdog(); | 879 | disable_lapic_nmi_watchdog(); |
881 | } else if (nmi_watchdog == NMI_IO_APIC) { | ||
882 | /* FIXME | ||
883 | * for some reason these functions don't work | ||
884 | */ | ||
885 | printk("Can not enable/disable NMI on IO APIC\n"); | ||
886 | return -EINVAL; | ||
887 | #if 0 | ||
888 | if (nmi_watchdog_enabled) | ||
889 | enable_timer_nmi_watchdog(); | ||
890 | else | ||
891 | disable_timer_nmi_watchdog(); | ||
892 | #endif | ||
893 | } else { | 880 | } else { |
894 | printk( KERN_WARNING | 881 | printk( KERN_WARNING |
895 | "NMI watchdog doesn't know what hardware to touch\n"); | 882 | "NMI watchdog doesn't know what hardware to touch\n"); |