View | Details | Raw Unified | Return to bug 7839 | Differences between
and this patch

Collapse All | Expand All

(-)a/arch/i386/kernel/apic.c (-1 / +1 lines)
Lines 1087-1093 static int __init detect_init_APIC (void Link Here
1087
	if (l & MSR_IA32_APICBASE_ENABLE)
1087
	if (l & MSR_IA32_APICBASE_ENABLE)
1088
		mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
1088
		mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
1089
1089
1090
	if (nmi_watchdog != NMI_NONE)
1090
	if (nmi_watchdog != NMI_NONE && nmi_watchdog != NMI_DISABLED)
1091
		nmi_watchdog = NMI_LOCAL_APIC;
1091
		nmi_watchdog = NMI_LOCAL_APIC;
1092
1092
1093
	printk(KERN_INFO "Found and enabled local APIC!\n");
1093
	printk(KERN_INFO "Found and enabled local APIC!\n");
(-)a/arch/i386/kernel/nmi.c (-2 / +2 lines)
Lines 77-83 static int __init check_nmi_watchdog(voi Link Here
77
	unsigned int *prev_nmi_count;
77
	unsigned int *prev_nmi_count;
78
	int cpu;
78
	int cpu;
79
79
80
	if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
80
	if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DISABLED))
81
		return 0;
81
		return 0;
82
82
83
	if (!atomic_read(&nmi_active))
83
	if (!atomic_read(&nmi_active))
Lines 424-430 int proc_nmi_enabled(struct ctl_table *t Link Here
424
	if (!!old_state == !!nmi_watchdog_enabled)
424
	if (!!old_state == !!nmi_watchdog_enabled)
425
		return 0;
425
		return 0;
426
426
427
	if (atomic_read(&nmi_active) < 0) {
427
	if (atomic_read(&nmi_active) < 0 || nmi_watchdog == NMI_DISABLED) {
428
		printk( KERN_WARNING "NMI watchdog is permanently disabled\n");
428
		printk( KERN_WARNING "NMI watchdog is permanently disabled\n");
429
		return -EIO;
429
		return -EIO;
430
	}
430
	}
(-)a/arch/x86_64/kernel/nmi.c (-2 / +2 lines)
Lines 85-91 int __init check_nmi_watchdog (void) Link Here
85
	int *counts;
85
	int *counts;
86
	int cpu;
86
	int cpu;
87
87
88
	if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
88
	if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DISABLED)) 
89
		return 0;
89
		return 0;
90
90
91
	if (!atomic_read(&nmi_active))
91
	if (!atomic_read(&nmi_active))
Lines 442-448 int proc_nmi_enabled(struct ctl_table *t Link Here
442
	if (!!old_state == !!nmi_watchdog_enabled)
442
	if (!!old_state == !!nmi_watchdog_enabled)
443
		return 0;
443
		return 0;
444
444
445
	if (atomic_read(&nmi_active) < 0) {
445
	if (atomic_read(&nmi_active) < 0 || nmi_watchdog == NMI_DISABLED) {
446
		printk( KERN_WARNING "NMI watchdog is permanently disabled\n");
446
		printk( KERN_WARNING "NMI watchdog is permanently disabled\n");
447
		return -EIO;
447
		return -EIO;
448
	}
448
	}
(-)a/include/asm-i386/nmi.h (-1 / +2 lines)
Lines 33-43 extern int nmi_watchdog_tick (struct pt_ Link Here
33
33
34
extern atomic_t nmi_active;
34
extern atomic_t nmi_active;
35
extern unsigned int nmi_watchdog;
35
extern unsigned int nmi_watchdog;
36
#define NMI_DEFAULT     -1
36
#define NMI_DISABLED    -1
37
#define NMI_NONE	0
37
#define NMI_NONE	0
38
#define NMI_IO_APIC	1
38
#define NMI_IO_APIC	1
39
#define NMI_LOCAL_APIC	2
39
#define NMI_LOCAL_APIC	2
40
#define NMI_INVALID	3
40
#define NMI_INVALID	3
41
#define NMI_DEFAULT	NMI_DISABLED
41
42
42
struct ctl_table;
43
struct ctl_table;
43
struct file;
44
struct file;
(-)a/include/asm-x86_64/nmi.h (-1 / +2 lines)
Lines 64-74 extern int setup_nmi_watchdog(char *); Link Here
64
64
65
extern atomic_t nmi_active;
65
extern atomic_t nmi_active;
66
extern unsigned int nmi_watchdog;
66
extern unsigned int nmi_watchdog;
67
#define NMI_DEFAULT	-1
67
#define NMI_DISABLED    -1
68
#define NMI_NONE	0
68
#define NMI_NONE	0
69
#define NMI_IO_APIC	1
69
#define NMI_IO_APIC	1
70
#define NMI_LOCAL_APIC	2
70
#define NMI_LOCAL_APIC	2
71
#define NMI_INVALID	3
71
#define NMI_INVALID	3
72
#define NMI_DEFAULT	NMI_DISABLED
72
73
73
struct ctl_table;
74
struct ctl_table;
74
struct file;
75
struct file;

Return to bug 7839