* [patch 18/50] genirq: add IRQ_NOREQUEST 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 request_irq() for certain interrupts.
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 | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
Index: linux-genirq.q/include/linux/irq.h
===================================================================
--- linux-genirq.q.orig/include/linux/irq.h
+++ linux-genirq.q/include/linux/irq.h
@@ -41,6 +41,7 @@
#endif
#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
+#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */
/**
* 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
@@ -141,7 +141,7 @@ int can_request_irq(unsigned int irq, un
{
struct irqaction *action;
- if (irq >= NR_IRQS)
+ if (irq >= NR_IRQS || irq_desc[irq].status & IRQ_NOREQUEST)
return 0;
action = irq_desc[irq].action;
@@ -356,6 +356,8 @@ int request_irq(unsigned int irq,
return -EINVAL;
if (irq >= NR_IRQS)
return -EINVAL;
+ if (irq_desc[irq].status & IRQ_NOREQUEST)
+ return -EINVAL;
if (!handler)
return -EINVAL;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-17 0:17 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 18/50] genirq: add IRQ_NOREQUEST 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®