From: Thomas Gleixner Introduce IRQ_NOPROBE: enables platforms to control chip-probing. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- include/linux/irq.h | 1 + kernel/irq/autoprobe.c | 4 ++-- kernel/irq/manage.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff -puN include/linux/irq.h~genirq-add-irq_noprobe-support include/linux/irq.h --- devel/include/linux/irq.h~genirq-add-irq_noprobe-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/include/linux/irq.h 2006-05-29 16:46:31.000000000 -0700 @@ -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 -puN kernel/irq/autoprobe.c~genirq-add-irq_noprobe-support kernel/irq/autoprobe.c --- devel/kernel/irq/autoprobe.c~genirq-add-irq_noprobe-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/kernel/irq/autoprobe.c 2006-05-29 16:46:31.000000000 -0700 @@ -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 -puN kernel/irq/manage.c~genirq-add-irq_noprobe-support kernel/irq/manage.c --- devel/kernel/irq/manage.c~genirq-add-irq_noprobe-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/kernel/irq/manage.c 2006-05-29 16:46:31.000000000 -0700 @@ -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 */ } _