]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] genirq: add IRQ_NOPROBE support
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jun 2006 09:24:49 +0000 (02:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Jun 2006 17:26:24 +0000 (10:26 -0700)
Introduce IRQ_NOPROBE: enables platforms to control chip-probing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/irq.h
kernel/irq/autoprobe.c
kernel/irq/manage.c

index 9a39756bfd31162f3891932d055b67d6c987bd72..b2fcf330cf2e047ba9536f9e88aace37c793c5dd 100644 (file)
@@ -40,6 +40,7 @@
 # define CHECK_IRQ_PER_CPU(var) 0
 #endif
 
+#define IRQ_NOPROBE    512     /* IRQ is not valid for probing */
 /**
  * struct hw_interrupt_type - hardware interrupt type descriptor
  *
index 5c988bba401fc4db32547e14297fde304db2b616..ed98c7d46cf207c3e548d0633d80b772c33974f9 100644 (file)
@@ -40,7 +40,7 @@ unsigned long probe_irq_on(void)
                desc = irq_desc + i;
 
                spin_lock_irq(&desc->lock);
-               if (!desc->action)
+               if (!desc->action && !(desc->status & IRQ_NOPROBE))
                        desc->chip->startup(i);
                spin_unlock_irq(&desc->lock);
        }
@@ -57,7 +57,7 @@ unsigned long probe_irq_on(void)
                desc = irq_desc + i;
 
                spin_lock_irq(&desc->lock);
-               if (!desc->action) {
+               if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
                        desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
                        if (desc->chip->startup(i))
                                desc->status |= IRQ_PENDING;
index cffde48438971c13b8b1f9b14bb84dc7fb3f7b1a..90a944a7fadcff28782e9199eb81439222f17cdf 100644 (file)
@@ -118,6 +118,10 @@ void enable_irq(unsigned int irq)
                WARN_ON(1);
                break;
        case 1: {
+               unsigned int status = desc->status & ~IRQ_DISABLED;
+
+               /* Prevent probing on this irq: */
+               desc->status = status | IRQ_NOPROBE;
                check_irq_resend(desc, irq);
                /* fall-through */
        }