* [patch 19/50] genirq: add IRQ_NOAUTOEN support
@ 2006-05-17 0:16 Ingo Molnar
0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 2006-05-17 0:16 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Gleixner, Benjamin Herrenschmidt, Russell King,
Andrew Morton, Christoph Hellwig, linux-arm-kernel
From: Thomas Gleixner <tglx@linutronix.de>
enable platforms to disable the automatic enabling of freshly set up irqs.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/irq.h | 1 +
kernel/irq/manage.c | 18 +++++++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
Index: linux-genirq.q/include/linux/irq.h
===================================================================
--- linux-genirq.q.orig/include/linux/irq.h
+++ linux-genirq.q/include/linux/irq.h
@@ -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
*
Index: linux-genirq.q/kernel/irq/manage.c
===================================================================
--- linux-genirq.q.orig/kernel/irq/manage.c
+++ linux-genirq.q/kernel/irq/manage.c
@@ -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->handler->startup)
- desc->handler->startup(irq);
- else
- desc->handler->enable(irq);
+ desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING |
+ IRQ_INPROGRESS);
+
+ if (!(desc->status & IRQ_NOAUTOEN)) {
+ desc->depth = 0;
+ desc->status &= ~IRQ_DISABLED;
+ if (desc->handler->startup)
+ desc->handler->startup(irq);
+ else
+ desc->handler->enable(irq);
+ }
}
spin_unlock_irqrestore(&desc->lock, flags);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-17 0:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-17 0:16 [patch 19/50] genirq: add IRQ_NOAUTOEN support Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®