diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-22 12:19:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-22 12:19:06 -0500 |
commit | ac935cb533b89a69e18ad175656910848ea0d79e (patch) | |
tree | bad12eb200f30f0838de8616605b01f73c683ffa | |
parent | b2214fca2bf7db492cd508769da7ca703a7f1806 (diff) | |
parent | 4960c9df1407c2723459c60ff13e6efe0c209c62 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
Revert "x86: fix NMI watchdog & 'stopped time' problem"
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/nmi_32.c | 9 |
2 files changed, 4 insertions, 17 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index c3a565bba106..a6b1490e00c4 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2169,14 +2169,10 @@ static inline void __init check_timer(void) | |||
2169 | { | 2169 | { |
2170 | int apic1, pin1, apic2, pin2; | 2170 | int apic1, pin1, apic2, pin2; |
2171 | int vector; | 2171 | int vector; |
2172 | unsigned int ver; | ||
2173 | unsigned long flags; | 2172 | unsigned long flags; |
2174 | 2173 | ||
2175 | local_irq_save(flags); | 2174 | local_irq_save(flags); |
2176 | 2175 | ||
2177 | ver = apic_read(APIC_LVR); | ||
2178 | ver = GET_APIC_VERSION(ver); | ||
2179 | |||
2180 | /* | 2176 | /* |
2181 | * get/set the timer IRQ vector: | 2177 | * get/set the timer IRQ vector: |
2182 | */ | 2178 | */ |
@@ -2189,15 +2185,11 @@ static inline void __init check_timer(void) | |||
2189 | * mode for the 8259A whenever interrupts are routed | 2185 | * mode for the 8259A whenever interrupts are routed |
2190 | * through I/O APICs. Also IRQ0 has to be enabled in | 2186 | * through I/O APICs. Also IRQ0 has to be enabled in |
2191 | * the 8259A which implies the virtual wire has to be | 2187 | * the 8259A which implies the virtual wire has to be |
2192 | * disabled in the local APIC. Finally timer interrupts | 2188 | * disabled in the local APIC. |
2193 | * need to be acknowledged manually in the 8259A for | ||
2194 | * timer_interrupt() and for the i82489DX when using | ||
2195 | * the NMI watchdog. | ||
2196 | */ | 2189 | */ |
2197 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2190 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2198 | init_8259A(1); | 2191 | init_8259A(1); |
2199 | timer_ack = !cpu_has_tsc; | 2192 | timer_ack = 1; |
2200 | timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2201 | if (timer_over_8254 > 0) | 2193 | if (timer_over_8254 > 0) |
2202 | enable_8259A_irq(0); | 2194 | enable_8259A_irq(0); |
2203 | 2195 | ||
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index 80ca72e5ac29..852db2906921 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
27 | #include <asm/nmi.h> | 27 | #include <asm/nmi.h> |
28 | #include <asm/timer.h> | ||
29 | 28 | ||
30 | #include "mach_traps.h" | 29 | #include "mach_traps.h" |
31 | 30 | ||
@@ -84,7 +83,7 @@ static int __init check_nmi_watchdog(void) | |||
84 | 83 | ||
85 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); | 84 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); |
86 | if (!prev_nmi_count) | 85 | if (!prev_nmi_count) |
87 | goto error; | 86 | return -1; |
88 | 87 | ||
89 | printk(KERN_INFO "Testing NMI watchdog ... "); | 88 | printk(KERN_INFO "Testing NMI watchdog ... "); |
90 | 89 | ||
@@ -119,7 +118,7 @@ static int __init check_nmi_watchdog(void) | |||
119 | if (!atomic_read(&nmi_active)) { | 118 | if (!atomic_read(&nmi_active)) { |
120 | kfree(prev_nmi_count); | 119 | kfree(prev_nmi_count); |
121 | atomic_set(&nmi_active, -1); | 120 | atomic_set(&nmi_active, -1); |
122 | goto error; | 121 | return -1; |
123 | } | 122 | } |
124 | printk("OK.\n"); | 123 | printk("OK.\n"); |
125 | 124 | ||
@@ -130,10 +129,6 @@ static int __init check_nmi_watchdog(void) | |||
130 | 129 | ||
131 | kfree(prev_nmi_count); | 130 | kfree(prev_nmi_count); |
132 | return 0; | 131 | return 0; |
133 | error: | ||
134 | timer_ack = !cpu_has_tsc; | ||
135 | |||
136 | return -1; | ||
137 | } | 132 | } |
138 | /* This needs to happen later in boot so counters are working */ | 133 | /* This needs to happen later in boot so counters are working */ |
139 | late_initcall(check_nmi_watchdog); | 134 | late_initcall(check_nmi_watchdog); |