Module Name:    src
Committed By:   skrll
Date:           Sat Apr 24 10:41:22 UTC 2010

Modified Files:
        src/sys/arch/hp700/dev: apic.c

Log Message:
Only post EOI once for shared interrupts.  From Mark Kettenis.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/dev/apic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp700/dev/apic.c
diff -u src/sys/arch/hp700/dev/apic.c:1.6 src/sys/arch/hp700/dev/apic.c:1.7
--- src/sys/arch/hp700/dev/apic.c:1.6	Tue Jan  5 13:20:29 2010
+++ src/sys/arch/hp700/dev/apic.c	Sat Apr 24 10:41:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: apic.c,v 1.6 2010/01/05 13:20:29 mbalmer Exp $	*/
+/*	$NetBSD: apic.c,v 1.7 2010/04/24 10:41:21 skrll Exp $	*/
 
 /*	$OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $	*/
 
@@ -235,19 +235,19 @@
 	struct apic_iv *iv = v;
 	struct elroy_softc *sc = iv->sc;
 	volatile struct elroy_regs *r = sc->sc_regs;
+	uint32_t irq = APIC_INT_IRQ(iv->ih);
 	int claimed = 0;
 
 	while (iv) {
 		if (iv->handler(iv->arg)) {
 			if (iv->cnt)
 				iv->cnt->ev_count++;
-			/* Signal EOI. */
-			elroy_write32(&r->apic_eoi,
-			    htole32((31 - APIC_INT_IRQ(iv->ih)) & APIC_ENT0_VEC));
 			claimed = 1;
 		}
 		iv = iv->next;
 	}
+	/* Signal EOI. */
+	elroy_write32(&r->apic_eoi, htole32((31 - irq) & APIC_ENT0_VEC));
 
 	return (claimed);
 }

Reply via email to