From: Thomas Gleixner Enable platforms to disable the automatic enabling of freshly set up irqs. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- include/linux/irq.h | 1 + kernel/irq/handle.c | 1 + kernel/irq/manage.c | 18 +++++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff -puN include/linux/irq.h~genirq-add-irq_noautoen-support include/linux/irq.h --- devel/include/linux/irq.h~genirq-add-irq_noautoen-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/include/linux/irq.h 2006-05-29 16:46:31.000000000 -0700 @@ -42,6 +42,7 @@ #define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ #define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ +#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ /** * struct hw_interrupt_type - hardware interrupt type descriptor * diff -puN kernel/irq/handle.c~genirq-add-irq_noautoen-support kernel/irq/handle.c --- devel/kernel/irq/handle.c~genirq-add-irq_noautoen-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/kernel/irq/handle.c 2006-05-29 16:46:31.000000000 -0700 @@ -32,6 +32,7 @@ struct irq_desc irq_desc[NR_IRQS] __cach [0 ... NR_IRQS-1] = { .status = IRQ_DISABLED, .chip = &no_irq_type, + .depth = 1, .lock = SPIN_LOCK_UNLOCKED, #ifdef CONFIG_SMP .affinity = CPU_MASK_ALL diff -puN kernel/irq/manage.c~genirq-add-irq_noautoen-support kernel/irq/manage.c --- devel/kernel/irq/manage.c~genirq-add-irq_noautoen-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/kernel/irq/manage.c 2006-05-29 16:46:31.000000000 -0700 @@ -216,13 +216,17 @@ int setup_irq(unsigned int irq, struct i desc->status |= IRQ_PER_CPU; #endif if (!shared) { - desc->depth = 0; - desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | - IRQ_WAITING | IRQ_INPROGRESS); - if (desc->chip->startup) - desc->chip->startup(irq); - else - desc->chip->enable(irq); + desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING | + IRQ_INPROGRESS); + + if (!(desc->status & IRQ_NOAUTOEN)) { + desc->depth = 0; + desc->status &= ~IRQ_DISABLED; + if (desc->chip->startup) + desc->chip->startup(irq); + else + desc->chip->enable(irq); + } } spin_unlock_irqrestore(&desc->lock, flags); _