Skip to content

Commit 4960c9d

Browse files
committed
Revert "x86: fix NMI watchdog & 'stopped time' problem"
This reverts commit d4d25de. It tried to fix long standing bugzilla entries, but the solution was reported to break other systems. The reporter of http://bugzilla.kernel.org/show_bug.cgi?id=9791 tracked it down to this commit and confirmed that reverting the patch restores the correct behaviour. It's too late in the release cycle to find a better solution than reverting the commit to avoid regressions. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Ingo Molnar <[email protected]>
1 parent d384e35 commit 4960c9d

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

arch/x86/kernel/io_apic_32.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,14 +2169,10 @@ static inline void __init check_timer(void)
21692169
{
21702170
int apic1, pin1, apic2, pin2;
21712171
int vector;
2172-
unsigned int ver;
21732172
unsigned long flags;
21742173

21752174
local_irq_save(flags);
21762175

2177-
ver = apic_read(APIC_LVR);
2178-
ver = GET_APIC_VERSION(ver);
2179-
21802176
/*
21812177
* get/set the timer IRQ vector:
21822178
*/
@@ -2189,15 +2185,11 @@ static inline void __init check_timer(void)
21892185
* mode for the 8259A whenever interrupts are routed
21902186
* through I/O APICs. Also IRQ0 has to be enabled in
21912187
* the 8259A which implies the virtual wire has to be
2192-
* disabled in the local APIC. Finally timer interrupts
2193-
* need to be acknowledged manually in the 8259A for
2194-
* timer_interrupt() and for the i82489DX when using
2195-
* the NMI watchdog.
2188+
* disabled in the local APIC.
21962189
*/
21972190
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
21982191
init_8259A(1);
2199-
timer_ack = !cpu_has_tsc;
2200-
timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2192+
timer_ack = 1;
22012193
if (timer_over_8254 > 0)
22022194
enable_8259A_irq(0);
22032195

arch/x86/kernel/nmi_32.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#include <asm/smp.h>
2727
#include <asm/nmi.h>
28-
#include <asm/timer.h>
2928

3029
#include "mach_traps.h"
3130

@@ -84,7 +83,7 @@ static int __init check_nmi_watchdog(void)
8483

8584
prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
8685
if (!prev_nmi_count)
87-
goto error;
86+
return -1;
8887

8988
printk(KERN_INFO "Testing NMI watchdog ... ");
9089

@@ -119,7 +118,7 @@ static int __init check_nmi_watchdog(void)
119118
if (!atomic_read(&nmi_active)) {
120119
kfree(prev_nmi_count);
121120
atomic_set(&nmi_active, -1);
122-
goto error;
121+
return -1;
123122
}
124123
printk("OK.\n");
125124

@@ -130,10 +129,6 @@ static int __init check_nmi_watchdog(void)
130129

131130
kfree(prev_nmi_count);
132131
return 0;
133-
error:
134-
timer_ack = !cpu_has_tsc;
135-
136-
return -1;
137132
}
138133
/* This needs to happen later in boot so counters are working */
139134
late_initcall(check_nmi_watchdog);

0 commit comments

Comments
 (0)