Skip to content

Commit 0b6a39f

Browse files
author
Ingo Molnar
committed
Revert "x86: fix ioapic bug again"
This reverts commit 6e90894. Németh Márton reported: | there is a problem in 2.6.26-rc3 which was not there in case of | 2.6.25: the CPU wakes up ~90,000 times per sec instead of ~60 per sec. | | I also "git bisected" the problem, the result is: | | 6e90894 is first bad commit | commit 6e90894 | Author: Ingo Molnar <[email protected]> | Date: Fri Mar 21 14:32:36 2008 +0100 | | x86: fix ioapic bug again the original problem is fixed by Maciej W. Rozycki in the tip/x86/apic branch (confirmed by Márton), but those changes are too intrusive for v2.6.26 so we'll go for the less intrusive (repeated) revert now. Reported-and-bisected-by: Németh Márton <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 86b2b70 commit 0b6a39f

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
@@ -2130,14 +2130,10 @@ static inline void __init check_timer(void)
21302130
{
21312131
int apic1, pin1, apic2, pin2;
21322132
int vector;
2133-
unsigned int ver;
21342133
unsigned long flags;
21352134

21362135
local_irq_save(flags);
21372136

2138-
ver = apic_read(APIC_LVR);
2139-
ver = GET_APIC_VERSION(ver);
2140-
21412137
/*
21422138
* get/set the timer IRQ vector:
21432139
*/
@@ -2150,15 +2146,11 @@ static inline void __init check_timer(void)
21502146
* mode for the 8259A whenever interrupts are routed
21512147
* through I/O APICs. Also IRQ0 has to be enabled in
21522148
* the 8259A which implies the virtual wire has to be
2153-
* disabled in the local APIC. Finally timer interrupts
2154-
* need to be acknowledged manually in the 8259A for
2155-
* timer_interrupt() and for the i82489DX when using
2156-
* the NMI watchdog.
2149+
* disabled in the local APIC.
21572150
*/
21582151
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
21592152
init_8259A(1);
2160-
timer_ack = !cpu_has_tsc;
2161-
timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2153+
timer_ack = 1;
21622154
if (timer_over_8254 > 0)
21632155
enable_8259A_irq(0);
21642156

arch/x86/kernel/nmi_32.c

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

2727
#include <asm/smp.h>
2828
#include <asm/nmi.h>
29-
#include <asm/timer.h>
3029

3130
#include "mach_traps.h"
3231

@@ -82,7 +81,7 @@ int __init check_nmi_watchdog(void)
8281

8382
prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
8483
if (!prev_nmi_count)
85-
goto error;
84+
return -1;
8685

8786
printk(KERN_INFO "Testing NMI watchdog ... ");
8887

@@ -119,7 +118,7 @@ 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 @@ 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

139134
static int __init setup_nmi_watchdog(char *str)

0 commit comments

Comments
 (0)