x86: do_IRQ - send EOI for x86-32 on irq without handler
PATCH 1/1 x86: do_IRQ - send EOI for x86-32 on irq without handler
For X86-32 if IRQ has no handler it remains non-Ack'ed even if APIC is not requested for being disabled. Fix it.
--- arch/x86/kernel/irq.c | 2 -- 1 file changed, 2 deletions(-)
arch/x86/kernel/irq.c +0 -2
@@ -218,10 +218,8 @@ unsigned int __irq_entry do_IRQ(struct p irq =__get_cpu_var (vector_irq)[vector];if (!handle_irq (irq, regs)) { -#ifdef CONFIG_X86_64 if (!disable_apic)ack_APIC_irq (); -#endif if (printk_ratelimit ()) printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n",
Quoted 3 lines · Cyrill Gorcunov
For X86-32 if IRQ has no handler it remains non-Ack'ed even if APIC is not requested for being disabled. Fix it.
nice fix. Did you observe any real hangs in such a situation, or is this via code review?
Ingo
Quoted 9 lines · Ingo Molnar
Quoted 3 lines · Cyrill Gorcunov
For X86-32 if IRQ has no handler it remains non-Ack'ed even if APIC is not requested for being disabled. Fix it.
nice fix. Did you observe any real hangs in such a situation, or is this via code review?
more stuff needs fixing here first:
arch/x86/kernel/irq.c: In function ‘do_IRQ’:arch/x86/kernel/irq.c:226: error: ‘disable_apic’ undeclared (first use in this function) arch/x86/kernel/irq.c:226: error: (Each undeclared identifier is reported only once arch/x86/kernel/irq.c:226: error: for each function it appears in.)
like making 'disable_apic' available everywhere.
Or better yet: introduce a dummy apic->write() method in the disable_apic=1 case so we can call a straight ack_APIC_irq().
Ingo
[Ingo Molnar - Wed, Apr 08, 2009 at 03:25:58PM +0200]
| | * Ingo Molnar <[email protected]> wrote: | | > | > * Cyrill Gorcunov <[email protected]> wrote: | > | > > For X86-32 if IRQ has no handler it remains non-Ack'ed | > > even if APIC is not requested for being disabled. | > > Fix it. | > | > nice fix. Did you observe any real hangs in such a situation, or is | > this via code review?
Code review
| | more stuff needs fixing here first: | | arch/x86/kernel/irq.c: In function ‘do_IRQ’: | arch/x86/kernel/irq.c:226: error: ‘disable_apic’ undeclared (first use in this function) | arch/x86/kernel/irq.c:226: error: (Each undeclared identifier is reported only once | arch/x86/kernel/irq.c:226: error: for each function it appears in.) | | like making 'disable_apic' available everywhere. | | Or better yet: introduce a dummy apic->write() method in the | disable_apic=1 case so we can call a straight ack_APIC_irq(). | | Ingo |
Ugh! Thanks Ingo! Will check and fix!
Cyrill