PERFORCE change 99182 for review

Paolo Pisati piso at FreeBSD.org
Tue Jun 13 22:21:53 UTC 2006


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

Change 99182 by piso at piso_newluxor on 2006/06/13 22:19:17

	First step toward interrupt filtering:
	convert all the INTR_FAST interrupt handlers
	to behave like a driver_filter_t, in this phase
	they will just return FILTER_HANDLED.
	
	Mark all the converted drivers with FIX_INTR_FILTER
	so i can easily find them later. 

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/fdc/fdc.c#2 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/fdc/fdc.c#2 (text+ko) ====

@@ -259,6 +259,7 @@
 #define FD_NOT_VALID -2
 
 static driver_intr_t fdc_intr;
+static driver_filter_t fdc_intr_fast;
 static void fdc_reset(struct fdc_data *);
 
 SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver");
@@ -672,6 +673,14 @@
 	wakeup(arg);
 }
 
+static int
+fdc_intr_fast(void *arg)
+{
+
+	wakeup(arg);
+	return(FILTER_HANDLED);
+}
+
 /*
  * fdc_pio(): perform programmed IO read/write for YE PCMCIA floppy.
  */
@@ -1736,10 +1745,12 @@
 		device_printf(dev, "does not respond\n");
 		return (error);
 	}
+	// XXX - FIX_INTR_FILTER
 	error = bus_setup_intr(dev, fdc->res_irq,
 	    INTR_TYPE_BIO | INTR_ENTROPY | INTR_MPSAFE |
-	    ((fdc->flags & FDC_NOFAST) ? 0 : INTR_FAST),
-	    fdc_intr, fdc, &fdc->fdc_intr);
+	    ((fdc->flags & FDC_NOFAST) ? 0 : INTR_FAST),			       
+	    ((fdc->flags & FDC_NOFAST) ? fdc_intr : (driver_intr_t *)fdc_intr_fast), 
+			       fdc, &fdc->fdc_intr);
 	if (error) {
 		device_printf(dev, "cannot setup interrupt\n");
 		return (error);


More information about the p4-projects mailing list