PERFORCE change 120736 for review

Paolo Pisati piso at FreeBSD.org
Fri Jun 1 22:10:19 UTC 2007


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

Change 120736 by piso at piso_newluxor on 2007/06/01 22:09:18

	Clear the interrupt in case a filter is run, or do that after the
	ithread ran.

Affected files ...

.. //depot/projects/soc2006/intr_filter/sparc64/fhc/fhc.c#10 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/sparc64/fhc/fhc.c#10 (text+ko) ====

@@ -398,13 +398,13 @@
 	struct fhc_clr *fc = arg;
 	int res;
 
-	if (fc->fc_filter != NULL)
+	if (fc->fc_filter != NULL) {
 		res = fc->fc_filter(fc->fc_arg);
-	else 
-		res = FILTER_HANDLED | FILTER_SCHEDULE_THREAD;
+		bus_space_write_4(fc->fc_bt, fc->fc_bh, FHC_ICLR, 0x0);
+		bus_space_read_4(fc->fc_bt, fc->fc_bh, FHC_ICLR);
+	} else 
+		res = FILTER_SCHEDULE_THREAD;
 
-	bus_space_write_4(fc->fc_bt, fc->fc_bh, FHC_ICLR, 0x0);
-	bus_space_read_4(fc->fc_bt, fc->fc_bh, FHC_ICLR);
 	return (res);
 }
 
@@ -414,6 +414,10 @@
 	struct fhc_clr *fc = arg;
 
 	fc->fc_func(fc->fc_arg);
+	if (fc->fc_filter == NULL) {
+		bus_space_write_4(fc->fc_bt, fc->fc_bh, FHC_ICLR, 0x0);
+		bus_space_read_4(fc->fc_bt, fc->fc_bh, FHC_ICLR);
+	}
 }
 
 static struct resource *


More information about the p4-projects mailing list