diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 80e63d8e9b153e1b5fb73ff9320fe5dcb0404991..f7b01b9a35b3a353789bf6ec2160c8d79d989f4e 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -44,6 +44,9 @@ * IRQF_TIMER - Flag to mark this interrupt as timer interrupt * IRQF_PERCPU - Interrupt is per cpu * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing + * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is + * registered first in an shared interrupt is considered for + * performance reasons) */ #define IRQF_DISABLED 0x00000020 #define IRQF_SAMPLE_RANDOM 0x00000040 @@ -52,6 +55,7 @@ #define IRQF_TIMER 0x00000200 #define IRQF_PERCPU 0x00000400 #define IRQF_NOBALANCING 0x00000800 +#define IRQF_IRQPOLL 0x00001000 /* * Migration helpers. Scheduled for removal in 9/2007 diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 515ad40bde15a874ea7471ceef32f8978a317cfd..32e1ab1477d1a975e6f19713eca1d41277da7f80 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c @@ -180,6 +180,8 @@ fastcall unsigned int __do_IRQ(unsigned int irq) if (desc->chip->ack) desc->chip->ack(irq); action_ret = handle_IRQ_event(irq, desc->action); + if (!noirqdebug) + note_interrupt(irq, desc, action_ret); desc->chip->end(irq); return 1; } diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 9d8c79b48823fdfb44d27fe3a3bf1c7adc9cdbc7..b0d81aae472ff44e61d3670f81112d4cd2f54ac9 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c @@ -146,7 +146,9 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, if (unlikely(irqfixup)) { /* Don't punish working computers */ - if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { + if ((irqfixup == 2 && ((irq == 0) || + (desc->action->flags & IRQF_IRQPOLL))) || + action_ret == IRQ_NONE) { int ok = misrouted_irq(irq); if (action_ret == IRQ_NONE) desc->irqs_unhandled -= ok;