Skip to contentSkip to conversation

genirq: add irq-chip support

PATCH In review Ingo Molnar 1 participant 1 message May 17, 2006 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 22/50 genirq: add irq-chip support

From: Thomas Gleixner <[email protected]>

enable platforms to use the irq-chip and irq-flow abstractions:
allow setting of the chip, the type and provide highlevel handlers for common irq-flows.

---
 include/linux/irq.h |   14 +
 kernel/irq/Makefile |    2 
 kernel/irq/chip.c   |  370 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 385 insertions(+), 1 deletion(-)
include/linux/irq.h +14 -0
Index: linux-genirq.q/include/linux/irq.h
===================================================================
@@ -308,6 +308,20 @@ extern int can_request_irq(unsigned int 
 /* Dummy irq-chip implementation: */
 extern struct irq_chip no_irq_chip;
 
+/* Set/get chip/data for an IRQ: */
+
+extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
+extern int set_irq_data(unsigned int irq, void *data);
+extern int set_irq_chip_data(unsigned int irq, void *data);
+extern int set_irq_type(unsigned int irq, unsigned int type);
+
+#define get_irq_chip(irq)	(irq_desc[irq].handler)
+#define get_irq_chip_data(irq)	(irq_desc[irq].chip_data)
+#define get_irq_data(irq)	(irq_desc[irq].handler_data)
+
+/* Set default functions for irq_chip structures: */
+extern void irq_chip_set_defaults(struct irq_chip *chip);
+
 #endif /* CONFIG_GENERIC_HARDIRQS */
 
 #endif /* !CONFIG_S390 */
kernel/irq/Makefile +1 -1
Index: linux-genirq.q/kernel/irq/Makefile
===================================================================
@@ -1,5 +1,5 @@
 
-obj-y := handle.o manage.o spurious.o resend.o
+obj-y := handle.o manage.o spurious.o resend.o chip.o
 obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o
 obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o
kernel/irq/chip.c new file +370 -0

370 lines not on this page · raw message