aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/autoprobe.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-08 05:39:15 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:16 -0500
commit163ef3091195f514a06f064b12914597d2644c55 (patch)
treea6e222b1a7366aa93c884257063aa36ef17cf91f /kernel/irq/autoprobe.c
parent3d67baec7f1b01fc289ac1a2f1a7e6d5e43391c6 (diff)
genirq: Move IRQ_REPLAY and IRQ_WAITING to core
No users outside of core. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/autoprobe.c')
-rw-r--r--kernel/irq/autoprobe.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c
index 916e56e10a2..9ea8bb99f7c 100644
--- a/kernel/irq/autoprobe.c
+++ b/kernel/irq/autoprobe.c
@@ -17,7 +17,7 @@
17/* 17/*
18 * Autodetection depends on the fact that any interrupt that 18 * Autodetection depends on the fact that any interrupt that
19 * comes in on to an unassigned handler will get stuck with 19 * comes in on to an unassigned handler will get stuck with
20 * "IRQ_WAITING" cleared and the interrupt disabled. 20 * "IRQS_WAITING" cleared and the interrupt disabled.
21 */ 21 */
22static DEFINE_MUTEX(probing_active); 22static DEFINE_MUTEX(probing_active);
23 23
@@ -75,8 +75,7 @@ unsigned long probe_irq_on(void)
75 for_each_irq_desc_reverse(i, desc) { 75 for_each_irq_desc_reverse(i, desc) {
76 raw_spin_lock_irq(&desc->lock); 76 raw_spin_lock_irq(&desc->lock);
77 if (!desc->action && !(desc->status & IRQ_NOPROBE)) { 77 if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
78 desc->istate |= IRQS_AUTODETECT; 78 desc->istate |= IRQS_AUTODETECT | IRQS_WAITING;
79 desc->status |= IRQ_WAITING;
80 if (irq_startup(desc)) 79 if (irq_startup(desc))
81 desc->status |= IRQ_PENDING; 80 desc->status |= IRQ_PENDING;
82 } 81 }
@@ -96,7 +95,7 @@ unsigned long probe_irq_on(void)
96 95
97 if (desc->istate & IRQS_AUTODETECT) { 96 if (desc->istate & IRQS_AUTODETECT) {
98 /* It triggered already - consider it spurious. */ 97 /* It triggered already - consider it spurious. */
99 if (!(desc->status & IRQ_WAITING)) { 98 if (!(desc->istate & IRQS_WAITING)) {
100 desc->istate &= ~IRQS_AUTODETECT; 99 desc->istate &= ~IRQS_AUTODETECT;
101 irq_shutdown(desc); 100 irq_shutdown(desc);
102 } else 101 } else
@@ -131,7 +130,7 @@ unsigned int probe_irq_mask(unsigned long val)
131 for_each_irq_desc(i, desc) { 130 for_each_irq_desc(i, desc) {
132 raw_spin_lock_irq(&desc->lock); 131 raw_spin_lock_irq(&desc->lock);
133 if (desc->istate & IRQS_AUTODETECT) { 132 if (desc->istate & IRQS_AUTODETECT) {
134 if (i < 16 && !(desc->status & IRQ_WAITING)) 133 if (i < 16 && !(desc->istate & IRQS_WAITING))
135 mask |= 1 << i; 134 mask |= 1 << i;
136 135
137 desc->istate &= ~IRQS_AUTODETECT; 136 desc->istate &= ~IRQS_AUTODETECT;
@@ -171,7 +170,7 @@ int probe_irq_off(unsigned long val)
171 raw_spin_lock_irq(&desc->lock); 170 raw_spin_lock_irq(&desc->lock);
172 171
173 if (desc->istate & IRQS_AUTODETECT) { 172 if (desc->istate & IRQS_AUTODETECT) {
174 if (!(desc->status & IRQ_WAITING)) { 173 if (!(desc->istate & IRQS_WAITING)) {
175 if (!nr_of_irqs) 174 if (!nr_of_irqs)
176 irq_found = i; 175 irq_found = i;
177 nr_of_irqs++; 176 nr_of_irqs++;