Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 2008 17:32:14 GMT
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 145231 for review
Message-ID:  <200807141732.m6EHWEsr051636@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145231

Change 145231 by gonzo@gonzo_jeeves on 2008/07/14 17:31:43

	o Sync to the latest intr_event API

Affected files ...

.. //depot/projects/mips2/src/sys/mips/malta/gt_pci.c#3 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/malta/gt_pci.c#3 (text+ko) ====

@@ -142,8 +142,7 @@
 {
 	struct gt_pci_softc *sc = v;
 	struct intr_event *event;
-	struct intr_handler *ih;
-	int irq, thread;
+	int irq;
 
 	for (;;) {
 		bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW3,
@@ -168,22 +167,13 @@
 		}
 
 		event = sc->sc_eventstab[irq];
-		thread = 0;
 
-		if (event && !TAILQ_EMPTY(&event->ie_handlers))
-		{
-			/* Execute fast handlers. */
-			TAILQ_FOREACH(ih, &event->ie_handlers, ih_next) {
-				if (ih->ih_filter == NULL)
-					thread = 1;
-				else
-					ih->ih_filter(ih->ih_argument);
-			}
-		}
+		if (!event || TAILQ_EMPTY(&event->ie_handlers))
+			continue;
 
-		/* Schedule thread if needed. */
-		if (thread)
-			intr_event_schedule_thread(event);
+		/* TODO: frame instead of NULL? */
+		intr_event_handle(event, NULL);
+		/* XXX: Log stray IRQs */
 
 		/* Send a specific EOI to the 8259. */
 		if (irq > 7) {
@@ -657,7 +647,7 @@
 
 	event = sc->sc_eventstab[irq];
 	if (event == NULL) {
-                error = intr_event_create(&event, (void *)irq, 0,
+                error = intr_event_create(&event, (void *)irq, 0, irq,
 		    (mask_fn)mips_mask_irq, (mask_fn)mips_unmask_irq,
 		    (mask_fn)mips_unmask_irq, NULL, "gt_pci intr%d:", irq);
 		if (error)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807141732.m6EHWEsr051636>