[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    [PATCH] i386 SA_INTERRUPT logic
From:       Jonathan Lundell <jlundell () pobox ! com>
Date:       2001-08-31 22:25:59
[Download RAW message or body]

Herewith a patch to arch/i386/kernel/irq.c:handle_IRQ_event(). To 
belabor the obvious, the SA_INTERRUPT flag ought to affect just the 
handler it's set (or not) for. The existing code can enable 
interrupts for drivers that don't want them enabled, or disable them 
for drivers that do. We've done cursory testing, but can't test all 
possible cases; it looks straightforward enough, though.

I notice that this is fixed in alpha, broken in arm, cris, ia64, 
mips, ppc, sh. The respective architecture maintainers might like to 
have a closer look.



--- /usr/src/linux-2.4.9/arch/i386/kernel/irq.c	Wed Jun 20 11:06:38 2001
+++ irq.c	Fri Aug 31 14:29:11 2001
@@ -443,17 +443,16 @@

  	status = 1;	/* Force the "do bottom halves" bit */

-	if (!(action->flags & SA_INTERRUPT))
-		__sti();
-
  	do {
  		status |= action->flags;
+		if (!(action->flags & SA_INTERRUPT))
+			__sti();
  		action->handler(irq, action->dev_id, regs);
+		__cli();
  		action = action->next;
  	} while (action);
  	if (status & SA_SAMPLE_RANDOM)
  		add_interrupt_randomness(irq);
-	__cli();

  	irq_exit(cpu, irq);

-- 
/Jonathan Lundell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic