Skip to contentSkip to conversation

x86: do_IRQ - send EOI for x86-32 on irq without handler

PATCH In review Cyrill Gorcunov 3 participants 4 messages Apr 3, 2009 – Apr 8, 2009 x86

lore
Share & tools
lore
#0 lore raw

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
Index: linux-2.6.git/arch/x86/kernel/irq.c
===================================================================
@@ -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",
#1 lore raw
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

#2 lore raw
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

#3 lore raw

[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