]> git.karo-electronics.de Git - linux-beck.git/commitdiff
genirq: Move IRQ_REPLAY and IRQ_WAITING to core
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Feb 2011 10:39:15 +0000 (11:39 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 19 Feb 2011 11:58:16 +0000 (12:58 +0100)
No users outside of core.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/irq.h
kernel/irq/autoprobe.c
kernel/irq/chip.c
kernel/irq/internals.h
kernel/irq/manage.c
kernel/irq/resend.c
kernel/irq/settings.h

index 1a4c723e74e11a0bebc771bf5b257677eb669ebd..c38dbd506656f546a7172700315a20b5c337371b 100644 (file)
@@ -53,12 +53,13 @@ typedef     void (*irq_flow_handler_t)(unsigned int irq,
 
 #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
 #define IRQ_INPROGRESS         0x00000100      /* DEPRECATED */
+#define IRQ_REPLAY             0x00000200      /* DEPRECATED */
+#define IRQ_WAITING            0x00000400      /* DEPRECATED */
 #endif
 
-#define IRQ_DISABLED           0x00000200      /* IRQ disabled - do not enter! */
-#define IRQ_PENDING            0x00000400      /* IRQ pending - replay on enable */
-#define IRQ_REPLAY             0x00000800      /* IRQ has been replayed but not acked yet */
-#define IRQ_WAITING            0x00002000      /* IRQ not yet seen - for autodetection */
+#define IRQ_DISABLED           0x00000800      /* IRQ disabled - do not enter! */
+#define IRQ_PENDING            0x00001000      /* IRQ pending - replay on enable */
+
 #define IRQ_LEVEL              0x00004000      /* IRQ level triggered */
 #define IRQ_MASKED             0x00008000      /* IRQ masked - shouldn't be seen again */
 #define IRQ_PER_CPU            0x00010000      /* IRQ is per CPU */
index 916e56e10a2e58e827ba851add2b46d285c67b76..9ea8bb99f7c1f3b6881fbe64babb9462d07c49f2 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * Autodetection depends on the fact that any interrupt that
  * comes in on to an unassigned handler will get stuck with
- * "IRQ_WAITING" cleared and the interrupt disabled.
+ * "IRQS_WAITING" cleared and the interrupt disabled.
  */
 static DEFINE_MUTEX(probing_active);
 
@@ -75,8 +75,7 @@ unsigned long probe_irq_on(void)
        for_each_irq_desc_reverse(i, desc) {
                raw_spin_lock_irq(&desc->lock);
                if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
-                       desc->istate |= IRQS_AUTODETECT;
-                       desc->status |= IRQ_WAITING;
+                       desc->istate |= IRQS_AUTODETECT | IRQS_WAITING;
                        if (irq_startup(desc))
                                desc->status |= IRQ_PENDING;
                }
@@ -96,7 +95,7 @@ unsigned long probe_irq_on(void)
 
                if (desc->istate & IRQS_AUTODETECT) {
                        /* It triggered already - consider it spurious. */
-                       if (!(desc->status & IRQ_WAITING)) {
+                       if (!(desc->istate & IRQS_WAITING)) {
                                desc->istate &= ~IRQS_AUTODETECT;
                                irq_shutdown(desc);
                        } else
@@ -131,7 +130,7 @@ unsigned int probe_irq_mask(unsigned long val)
        for_each_irq_desc(i, desc) {
                raw_spin_lock_irq(&desc->lock);
                if (desc->istate & IRQS_AUTODETECT) {
-                       if (i < 16 && !(desc->status & IRQ_WAITING))
+                       if (i < 16 && !(desc->istate & IRQS_WAITING))
                                mask |= 1 << i;
 
                        desc->istate &= ~IRQS_AUTODETECT;
@@ -171,7 +170,7 @@ int probe_irq_off(unsigned long val)
                raw_spin_lock_irq(&desc->lock);
 
                if (desc->istate & IRQS_AUTODETECT) {
-                       if (!(desc->status & IRQ_WAITING)) {
+                       if (!(desc->istate & IRQS_WAITING)) {
                                if (!nr_of_irqs)
                                        irq_found = i;
                                nr_of_irqs++;
index 420fa6bdb117728a2fcf310771c96002e264b5a8..59ae14527ecda277a884ee6ef66f9d4beb5bea49 100644 (file)
@@ -428,7 +428,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
                if (!irq_check_poll(desc))
                        goto out_unlock;
 
-       desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+       desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
        kstat_incr_irqs_this_cpu(irq, desc);
 
        if (unlikely(!desc->action || (desc->status & IRQ_DISABLED)))
@@ -460,7 +460,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
                if (!irq_check_poll(desc))
                        goto out_unlock;
 
-       desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+       desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
        kstat_incr_irqs_this_cpu(irq, desc);
 
        /*
@@ -498,7 +498,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
                if (!irq_check_poll(desc))
                        goto out;
 
-       desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+       desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
        kstat_incr_irqs_this_cpu(irq, desc);
 
        /*
@@ -537,8 +537,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
 {
        raw_spin_lock(&desc->lock);
 
-       desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
-
+       desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
        /*
         * If we're currently running this IRQ, or its disabled,
         * we shouldn't process the IRQ. Mark it pending, handle
index 36563f731ff878d40829696d39c53a5bcd9fca95..54037533af7afb051478e6afb8af1563df18c2c0 100644 (file)
@@ -43,6 +43,8 @@ enum {
  * IRQS_POLL_INPROGRESS                - polling in progress
  * IRQS_INPROGRESS             - Interrupt in progress
  * IRQS_ONESHOT                        - irq is not unmasked in primary handler
+ * IRQS_REPLAY                 - irq is replayed
+ * IRQS_WAITING                        - irq is waiting
  */
 enum {
        IRQS_AUTODETECT         = 0x00000001,
@@ -50,6 +52,8 @@ enum {
        IRQS_POLL_INPROGRESS    = 0x00000008,
        IRQS_INPROGRESS         = 0x00000010,
        IRQS_ONESHOT            = 0x00000020,
+       IRQS_REPLAY             = 0x00000040,
+       IRQS_WAITING            = 0x00000080,
 };
 
 #define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
@@ -135,8 +139,6 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
 
        P(IRQ_DISABLED);
        P(IRQ_PENDING);
-       P(IRQ_REPLAY);
-       P(IRQ_WAITING);
        P(IRQ_LEVEL);
        P(IRQ_MASKED);
 #ifdef CONFIG_IRQ_PER_CPU
@@ -148,6 +150,8 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
 
        PS(IRQS_AUTODETECT);
        PS(IRQS_INPROGRESS);
+       PS(IRQS_REPLAY);
+       PS(IRQS_WAITING);
 }
 
 #undef P
index aca4208a03ac671bad2912a0a894bd10fbf976b7..7971df53d6a91838b95fb992155771d212bd8dfa 100644 (file)
@@ -897,9 +897,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
                        desc->status |= IRQ_PER_CPU;
 #endif
 
-               desc->status &= ~IRQ_WAITING;
                desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
-                                 IRQS_INPROGRESS | IRQS_ONESHOT);
+                                 IRQS_INPROGRESS | IRQS_ONESHOT | \
+                                 IRQS_WAITING);
 
                if (new->flags & IRQF_ONESHOT)
                        desc->istate |= IRQS_ONESHOT;
index 60b20261041b885980692a6a3eb3c5f4c2549608..f83387cd11f3b3ed702e970901bb82501f2eaaa5 100644 (file)
@@ -62,8 +62,11 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
         */
        if (desc->status & IRQ_LEVEL)
                return;
-       if ((desc->status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
-               desc->status = (desc->status & ~IRQ_PENDING) | IRQ_REPLAY;
+       if (desc->istate & IRQS_REPLAY)
+               return;
+       if (desc->status & IRQ_PENDING) {
+               desc->status &= ~IRQ_PENDING;
+               desc->istate |= IRQS_REPLAY;
 
                if (!desc->irq_data.chip->irq_retrigger ||
                    !desc->irq_data.chip->irq_retrigger(&desc->irq_data)) {
index a96140eea409e08dc36946ccbf27c34cea875a9f..2e7d08fff0ce818f9ef041d1148baa32b82bd543 100644 (file)
@@ -8,3 +8,7 @@ enum {
 
 #undef IRQ_INPROGRESS
 #define IRQ_INPROGRESS         GOT_YOU_MORON
+#undef IRQ_REPLAY
+#define IRQ_REPLAY             GOT_YOU_MORON
+#undef IRQ_WAITING
+#define IRQ_WAITING            GOT_YOU_MORON