PERFORCE change 117394 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Wed Apr 4 21:14:45 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=117394

Change 117394 by gonzo at gonzo_jeeves on 2007/04/04 21:13:52

	o Add filtering support to interrupts-related code.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/mips/tick.c#4 edit
.. //depot/projects/mips2/src/sys/mips/mips4k/malta/gt.c#3 edit
.. //depot/projects/mips2/src/sys/mips/mips4k/malta/gt_pci.c#4 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/mips/tick.c#4 (text+ko) ====

@@ -194,7 +194,7 @@
 /*
  * Device section of file below
  */  
-static void
+static int
 clock_intr(void *arg)
 {
 	struct trapframe	*tf;
@@ -206,7 +206,6 @@
 
 	mips_wr_compare(mips_rd_count() + counter_freq / hz);
 
-
 	/*
 	 * Magic.  Setting up with an arg of NULL means we get passed tf.
 	 */
@@ -219,6 +218,7 @@
 		hardclock(usermode, pc);
 	}
 
+	return (FILTER_HANDLED);
 }
 
 static int
@@ -252,7 +252,7 @@
 	}
 	error = bus_setup_intr(dev, irq,
 				   INTR_TYPE_CLK | INTR_MPSAFE | INTR_FAST,
-				   clock_intr, NULL, NULL);
+				   clock_intr, NULL, NULL, NULL);
 	if (error != 0) {
 		device_printf(dev, "bus_setup_intr returned %d\n", error);
 		return (error);

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

@@ -85,11 +85,11 @@
 
 static int
 gt_setup_intr(device_t dev, device_t child,
-    struct resource *ires, int flags, driver_intr_t *intr, void *arg,
-    void **cookiep)
+    struct resource *ires, int flags, driver_filter_t *filt, 
+    driver_intr_t *intr, void *arg, void **cookiep)
 {
 	return BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, 
-	    intr, arg, cookiep);
+	    filt, intr, arg, cookiep);
 }
 
 static int

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

@@ -352,7 +352,7 @@
         }
 
         if ((bus_setup_intr(dev, sc->sc_irq, INTR_FAST | INTR_MPSAFE,
-                            gt_pci_intr, sc, &sc->sc_ih))) {
+                            NULL, gt_pci_intr, sc, &sc->sc_ih))) {
 		device_printf(dev, 
 		    "WARNING: unable to register interrupt handler\n");
 		return ENXIO;


More information about the p4-projects mailing list