Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99316
b: refs/heads/master
c: d11d579
h: refs/heads/master
v: v3
  • Loading branch information
Maciej W. Rozycki authored and Ingo Molnar committed Jul 8, 2008
1 parent cc9fff9 commit 33c741c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0176e2485ce6468f9b74264a2fd6c19811f027a
refs/heads/master: d11d5794e0c21a1054e6cd57381050a999ad7232
20 changes: 9 additions & 11 deletions trunk/arch/x86/kernel/io_apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2146,19 +2146,17 @@ static inline void __init check_timer(void)
set_intr_gate(vector, interrupt[0]);

/*
* Subtle, code in do_timer_interrupt() expects an AEOI
* mode for the 8259A whenever interrupts are routed
* through I/O APICs. Also IRQ0 has to be enabled in
* the 8259A which implies the virtual wire has to be
* disabled in the local APIC. Finally timer interrupts
* need to be acknowledged manually in the 8259A for
* timer_interrupt() and for the i82489DX when using
* the NMI watchdog.
* As IRQ0 is to be enabled in the 8259A, the virtual
* wire has to be disabled in the local APIC. Also
* timer interrupts need to be acknowledged manually in
* the 8259A for the i82489DX when using the NMI
* watchdog as that APIC treats NMIs as level-triggered.
* The AEOI mode will finish them in the 8259A
* automatically.
*/
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
init_8259A(1);
timer_ack = !cpu_has_tsc;
timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
if (timer_over_8254 > 0)
enable_8259A_irq(0);

Expand Down Expand Up @@ -2219,6 +2217,7 @@ static inline void __init check_timer(void)
printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");
nmi_watchdog = 0;
}
timer_ack = 0;

printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");

Expand All @@ -2237,7 +2236,6 @@ static inline void __init check_timer(void)

printk(KERN_INFO "...trying to set up timer as ExtINT IRQ...");

timer_ack = 0;
init_8259A(0);
make_8259A_irq(0);
apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/x86/kernel/io_apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,11 +1669,8 @@ static inline void __init check_timer(void)
assign_irq_vector(0, TARGET_CPUS);

/*
* Subtle, code in do_timer_interrupt() expects an AEOI
* mode for the 8259A whenever interrupts are routed
* through I/O APICs. Also IRQ0 has to be enabled in
* the 8259A which implies the virtual wire has to be
* disabled in the local APIC.
* As IRQ0 is to be enabled in the 8259A, the virtual
* wire has to be disabled in the local APIC.
*/
apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
init_8259A(1);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/nmi_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int __init check_nmi_watchdog(void)
kfree(prev_nmi_count);
return 0;
error:
timer_ack = !cpu_has_tsc;
timer_ack = 0;

return -1;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
if (timer_ack) {
/*
* Subtle, when I/O APICs are used we have to ack timer IRQ
* manually to reset the IRR bit for do_slow_gettimeoffset().
* This will also deassert NMI lines for the watchdog if run
* manually to deassert NMI lines for the watchdog if run
* on an 82489DX-based system.
*/
spin_lock(&i8259A_lock);
Expand Down

0 comments on commit 33c741c

Please sign in to comment.