diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-06 19:29:15 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:13 -0500 |
commit | 0877d66257082ce86fca8f9826b91870575b272c (patch) | |
tree | 40b8e2e6414cc58992107fef7409299e6dcfe8b4 /kernel/irq | |
parent | 849f061c25f8951d11c7dd88f44950ccde296392 (diff) |
genirq: Use handle_irq_event() in the spurious poll code
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/spurious.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 89e5e16aca39..bc0620745d5f 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -56,13 +56,14 @@ bool irq_wait_for_poll(struct irq_desc *desc) | |||
56 | #endif | 56 | #endif |
57 | } | 57 | } |
58 | 58 | ||
59 | |||
59 | /* | 60 | /* |
60 | * Recovery handler for misrouted interrupts. | 61 | * Recovery handler for misrouted interrupts. |
61 | */ | 62 | */ |
62 | static int try_one_irq(int irq, struct irq_desc *desc, bool force) | 63 | static int try_one_irq(int irq, struct irq_desc *desc, bool force) |
63 | { | 64 | { |
65 | irqreturn_t ret = IRQ_NONE; | ||
64 | struct irqaction *action; | 66 | struct irqaction *action; |
65 | int ok = 0; | ||
66 | 67 | ||
67 | raw_spin_lock(&desc->lock); | 68 | raw_spin_lock(&desc->lock); |
68 | 69 | ||
@@ -96,21 +97,17 @@ static int try_one_irq(int irq, struct irq_desc *desc, bool force) | |||
96 | goto out; | 97 | goto out; |
97 | } | 98 | } |
98 | 99 | ||
99 | /* Honour the normal IRQ locking and mark it poll in progress */ | 100 | /* Mark it poll in progress */ |
100 | desc->status |= IRQ_INPROGRESS | IRQ_POLL_INPROGRESS; | 101 | desc->status |= IRQ_POLL_INPROGRESS; |
101 | do { | 102 | do { |
102 | desc->status &= ~IRQ_PENDING; | 103 | if (handle_irq_event(desc) == IRQ_HANDLED) |
103 | raw_spin_unlock(&desc->lock); | 104 | ret = IRQ_HANDLED; |
104 | if (handle_IRQ_event(irq, action) != IRQ_NONE) | ||
105 | ok = 1; | ||
106 | raw_spin_lock(&desc->lock); | ||
107 | action = desc->action; | 105 | action = desc->action; |
108 | } while ((desc->status & IRQ_PENDING) && action); | 106 | } while ((desc->status & IRQ_PENDING) && action); |
109 | 107 | desc->status &= ~IRQ_POLL_INPROGRESS; | |
110 | desc->status &= ~(IRQ_INPROGRESS | IRQ_POLL_INPROGRESS); | ||
111 | out: | 108 | out: |
112 | raw_spin_unlock(&desc->lock); | 109 | raw_spin_unlock(&desc->lock); |
113 | return ok; | 110 | return ret == IRQ_HANDLED; |
114 | } | 111 | } |
115 | 112 | ||
116 | static int misrouted_irq(int irq) | 113 | static int misrouted_irq(int irq) |