From: Thomas Gleixner Date: Thu, 29 Jun 2006 09:24:49 +0000 (-0700) Subject: [PATCH] genirq: add IRQ_NOPROBE support X-Git-Tag: v2.6.18-rc1~377 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3418d72404e35eb19e7995cbf3e7a76ba8fefbce;p=linux-2.6 [PATCH] genirq: add IRQ_NOPROBE support Introduce IRQ_NOPROBE: enables platforms to control chip-probing. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/irq.h b/include/linux/irq.h index 9a39756bfd..b2fcf330cf 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -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 * diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index 5c988bba40..ed98c7d46c 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c @@ -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; diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index cffde48438..90a944a7fa 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -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 */ }