Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2006 13:36:03 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 101272 for review
Message-ID:  <200607111336.k6BDa3fH037964@repoman.freebsd.org>

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

Change 101272 by piso@piso_newluxor on 2006/07/11 13:35:02

	Correct the EOI and mask&EOI logic after calling intr_filter_loop(). 

Affected files ...

.. //depot/projects/soc2006/intr_filter/amd64/amd64/intr_machdep.c#4 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/amd64/amd64/intr_machdep.c#4 (text+ko) ====

@@ -220,20 +220,21 @@
 	thread = 0;
 	critical_enter();
 	thread = intr_filter_loop(ie, frame);
-	
+
 	/*
-	 * If there are any threaded handlers that need to run,
-	 * mask the source as well as sending it an EOI.  Otherwise,
-	 * just send it an EOI but leave it unmasked.
+	 * If the interrupt was fully served, send it an EOI but leave it 
+	 * unmasked. Otherwise, if there are any threaded handlers that need 
+	 * to run or it was a stray interrupt, mask the source as well as 
+	 * sending it an EOI.
 	 */
-	if (thread)
-		isrc->is_pic->pic_disable_source(isrc, PIC_EOI);
+	if (thread & FILTER_HANDLED)
+		isrc->is_pic->pic_eoi_source(isrc);		
 	else
-		isrc->is_pic->pic_eoi_source(isrc);
+		isrc->is_pic->pic_disable_source(isrc, PIC_EOI);	
 	critical_exit();
 
 	/* Schedule the ithread if needed. */
-	if (thread) {
+	if (thread & FILTER_SCHEDULE_THREAD) {
 		error = intr_event_schedule_thread(ie);
 		KASSERT(error == 0, ("bad stray interrupt"));
 	}



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