diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-07 14:40:54 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:15 -0500 |
commit | 7acdd53e5b2c55b6f7e3427e85e2f91fa814a4f9 (patch) | |
tree | 4806536bae32605a3107d6c4384547693eda566c /kernel/irq | |
parent | bd062e7667ac173afef57fbfe9327f3b914a9d4c (diff) |
genirq: Move IRQ_SPURIOUS_DISABLED to core state
No users outside.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/internals.h | 3 | ||||
-rw-r--r-- | kernel/irq/manage.c | 9 | ||||
-rw-r--r-- | kernel/irq/spurious.c | 8 |
3 files changed, 11 insertions, 9 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index 7ffd4f439b92..dc5e21b84f9e 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -37,9 +37,12 @@ enum { | |||
37 | * Bit masks for desc->state | 37 | * Bit masks for desc->state |
38 | * | 38 | * |
39 | * IRQS_AUTODETECT - autodetection in progress | 39 | * IRQS_AUTODETECT - autodetection in progress |
40 | * IRQS_SPURIOUS_DISABLED - was disabled due to spurious interrupt | ||
41 | * detection | ||
40 | */ | 42 | */ |
41 | enum { | 43 | enum { |
42 | IRQS_AUTODETECT = 0x00000001, | 44 | IRQS_AUTODETECT = 0x00000001, |
45 | IRQS_SPURIOUS_DISABLED = 0x00000002, | ||
43 | }; | 46 | }; |
44 | 47 | ||
45 | #define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data) | 48 | #define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data) |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index abe852c9449d..5b918ffa46af 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -897,9 +897,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
897 | desc->status |= IRQ_PER_CPU; | 897 | desc->status |= IRQ_PER_CPU; |
898 | #endif | 898 | #endif |
899 | 899 | ||
900 | desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT | | 900 | desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT | IRQ_INPROGRESS); |
901 | IRQ_INPROGRESS | IRQ_SPURIOUS_DISABLED); | 901 | desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED); |
902 | desc->istate &= ~IRQS_AUTODETECT; | ||
903 | 902 | ||
904 | if (new->flags & IRQF_ONESHOT) | 903 | if (new->flags & IRQF_ONESHOT) |
905 | desc->status |= IRQ_ONESHOT; | 904 | desc->status |= IRQ_ONESHOT; |
@@ -937,8 +936,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
937 | * Check whether we disabled the irq via the spurious handler | 936 | * Check whether we disabled the irq via the spurious handler |
938 | * before. Reenable it and give it another chance. | 937 | * before. Reenable it and give it another chance. |
939 | */ | 938 | */ |
940 | if (shared && (desc->status & IRQ_SPURIOUS_DISABLED)) { | 939 | if (shared && (desc->istate & IRQS_SPURIOUS_DISABLED)) { |
941 | desc->status &= ~IRQ_SPURIOUS_DISABLED; | 940 | desc->istate &= ~IRQS_SPURIOUS_DISABLED; |
942 | __enable_irq(desc, irq, false); | 941 | __enable_irq(desc, irq, false); |
943 | } | 942 | } |
944 | 943 | ||
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index bc0620745d5f..2941d8a22df7 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -146,15 +146,15 @@ static void poll_spurious_irqs(unsigned long dummy) | |||
146 | irq_poll_cpu = smp_processor_id(); | 146 | irq_poll_cpu = smp_processor_id(); |
147 | 147 | ||
148 | for_each_irq_desc(i, desc) { | 148 | for_each_irq_desc(i, desc) { |
149 | unsigned int status; | 149 | unsigned int state; |
150 | 150 | ||
151 | if (!i) | 151 | if (!i) |
152 | continue; | 152 | continue; |
153 | 153 | ||
154 | /* Racy but it doesn't matter */ | 154 | /* Racy but it doesn't matter */ |
155 | status = desc->status; | 155 | state = desc->istate; |
156 | barrier(); | 156 | barrier(); |
157 | if (!(status & IRQ_SPURIOUS_DISABLED)) | 157 | if (!(state & IRQS_SPURIOUS_DISABLED)) |
158 | continue; | 158 | continue; |
159 | 159 | ||
160 | local_irq_disable(); | 160 | local_irq_disable(); |
@@ -298,7 +298,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, | |||
298 | * Now kill the IRQ | 298 | * Now kill the IRQ |
299 | */ | 299 | */ |
300 | printk(KERN_EMERG "Disabling IRQ #%d\n", irq); | 300 | printk(KERN_EMERG "Disabling IRQ #%d\n", irq); |
301 | desc->status |= IRQ_SPURIOUS_DISABLED; | 301 | desc->istate |= IRQS_SPURIOUS_DISABLED; |
302 | desc->depth++; | 302 | desc->depth++; |
303 | irq_disable(desc); | 303 | irq_disable(desc); |
304 | 304 | ||