Skip to contentSkip to conversation

genirq: add genirq sw IRQ-retrigger

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

lore
Share & tools
lore
#0 lore raw

PATCH 16/50 genirq: add genirq sw IRQ-retrigger

From: Thomas Gleixner <[email protected]>

enable platforms that do not have a hardware-assisted hardirq-resend mechanism to resend them via a softirq-driven IRQ emulation mechanism.

---
 include/linux/irq.h |    3 +
 kernel/irq/Makefile |    2 -
 kernel/irq/manage.c |   10 ------
 kernel/irq/resend.c |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 84 insertions(+), 10 deletions(-)
include/linux/irq.h +3 -0
Index: linux-genirq.q/include/linux/irq.h
===================================================================
@@ -242,6 +242,9 @@ extern void note_interrupt(unsigned int 
 			   int action_ret, struct pt_regs *regs);
 extern int can_request_irq(unsigned int irq, unsigned long irqflags);
 
+/* Resending of interrupts :*/
+void check_irq_resend(struct irq_desc *desc, unsigned int irq);
+
 extern void init_irq_proc(void);
 
 #endif /* CONFIG_GENERIC_HARDIRQS */
kernel/irq/Makefile +1 -1
Index: linux-genirq.q/kernel/irq/Makefile
===================================================================
@@ -1,5 +1,5 @@
 
-obj-y := handle.o manage.o spurious.o
+obj-y := handle.o manage.o spurious.o resend.o
 obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o
 obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o
kernel/irq/manage.c +1 -9
Index: linux-genirq.q/kernel/irq/manage.c
===================================================================
@@ -118,15 +118,7 @@ void enable_irq(unsigned int irq)
 		WARN_ON(1);
 		break;
 	case 1: {
-		unsigned int status = desc->status & ~IRQ_DISABLED;
-
-		desc->status = status;
-		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
-			desc->status = status | IRQ_REPLAY;
-			if (desc->handler && desc->handler->retrigger)
-				desc->handler->retrigger(irq);
-		}
-		desc->handler->enable(irq);
+		check_irq_resend(desc, irq);
 		/* fall-through */
 	}
 	default:
kernel/irq/resend.c new file +79 -0

79 lines not on this page · raw message