aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2007-05-08 03:35:24 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:22 -0400
commitd85a60d85ea5b7c597508c1510c88e657773d378 (patch)
tree2b5d1a5311074de8c12811e7ddf26e3cda4a41a0 /kernel
parent951744fea0aea9adbd7c8cacb3605f2d69a66f96 (diff)
Add IRQF_IRQPOLL flag (common code)
irqpoll is broken on some architectures that don't use the IRQ 0 for the timer interrupt like IA64. This patch adds a IRQF_IRQPOLL flag. Each architecture is handled in a separate pach. As I left the irq == 0 as condition, this should not break existing architectures that use timer_irq == 0 and that I did't address with that patch (because I don't know). This patch: This patch adds a IRQF_IRQPOLL flag that the interrupt registration code could use for the interrupt it wants to use for IRQ polling. Because this must not be the timer interrupt, an additional flag was added instead of re-using the IRQF_TIMER constant. Until all architectures will have an IRQF_IRQPOLL interrupt, irq == 0 will stay as alternative as it should not break anything. Also, note_interrupt() is called on CPU-specific interrupts to be used as interrupt source for IRQ polling. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Matthew Wilcox <willy@debian.org> Cc: Grant Grundler <grundler@google.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/handle.c2
-rw-r--r--kernel/irq/spurious.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 515ad40bde15..32e1ab1477d1 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -180,6 +180,8 @@ fastcall unsigned int __do_IRQ(unsigned int irq)
180 if (desc->chip->ack) 180 if (desc->chip->ack)
181 desc->chip->ack(irq); 181 desc->chip->ack(irq);
182 action_ret = handle_IRQ_event(irq, desc->action); 182 action_ret = handle_IRQ_event(irq, desc->action);
183 if (!noirqdebug)
184 note_interrupt(irq, desc, action_ret);
183 desc->chip->end(irq); 185 desc->chip->end(irq);
184 return 1; 186 return 1;
185 } 187 }
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 9d8c79b48823..b0d81aae472f 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,
146 146
147 if (unlikely(irqfixup)) { 147 if (unlikely(irqfixup)) {
148 /* Don't punish working computers */ 148 /* Don't punish working computers */
149 if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { 149 if ((irqfixup == 2 && ((irq == 0) ||
150 (desc->action->flags & IRQF_IRQPOLL))) ||
151 action_ret == IRQ_NONE) {
150 int ok = misrouted_irq(irq); 152 int ok = misrouted_irq(irq);
151 if (action_ret == IRQ_NONE) 153 if (action_ret == IRQ_NONE)
152 desc->irqs_unhandled -= ok; 154 desc->irqs_unhandled -= ok;