genirq: Move IRQ_SPURIOUS_DISABLED to core state
No users outside.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 7ffd4f4..dc5e21b 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -37,9 +37,12 @@
* Bit masks for desc->state
*
* IRQS_AUTODETECT - autodetection in progress
+ * IRQS_SPURIOUS_DISABLED - was disabled due to spurious interrupt
+ * detection
*/
enum {
IRQS_AUTODETECT = 0x00000001,
+ IRQS_SPURIOUS_DISABLED = 0x00000002,
};
#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 abe852c..5b918ff 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -897,9 +897,8 @@
desc->status |= IRQ_PER_CPU;
#endif
- desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT |
- IRQ_INPROGRESS | IRQ_SPURIOUS_DISABLED);
- desc->istate &= ~IRQS_AUTODETECT;
+ desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT | IRQ_INPROGRESS);
+ desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED);
if (new->flags & IRQF_ONESHOT)
desc->status |= IRQ_ONESHOT;
@@ -937,8 +936,8 @@
* Check whether we disabled the irq via the spurious handler
* before. Reenable it and give it another chance.
*/
- if (shared && (desc->status & IRQ_SPURIOUS_DISABLED)) {
- desc->status &= ~IRQ_SPURIOUS_DISABLED;
+ if (shared && (desc->istate & IRQS_SPURIOUS_DISABLED)) {
+ desc->istate &= ~IRQS_SPURIOUS_DISABLED;
__enable_irq(desc, irq, false);
}
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index bc06207..2941d8a 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -146,15 +146,15 @@
irq_poll_cpu = smp_processor_id();
for_each_irq_desc(i, desc) {
- unsigned int status;
+ unsigned int state;
if (!i)
continue;
/* Racy but it doesn't matter */
- status = desc->status;
+ state = desc->istate;
barrier();
- if (!(status & IRQ_SPURIOUS_DISABLED))
+ if (!(state & IRQS_SPURIOUS_DISABLED))
continue;
local_irq_disable();
@@ -298,7 +298,7 @@
* Now kill the IRQ
*/
printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
- desc->status |= IRQ_SPURIOUS_DISABLED;
+ desc->istate |= IRQS_SPURIOUS_DISABLED;
desc->depth++;
irq_disable(desc);