From owner-p4-projects@FreeBSD.ORG Tue Jul 11 13:36:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE89C16A4E5; Tue, 11 Jul 2006 13:36:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C871F16A4E0 for ; Tue, 11 Jul 2006 13:36:09 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D484B43D49 for ; Tue, 11 Jul 2006 13:36:03 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6BDa3T8037967 for ; Tue, 11 Jul 2006 13:36:03 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6BDa3fH037964 for perforce@freebsd.org; Tue, 11 Jul 2006 13:36:03 GMT (envelope-from piso@freebsd.org) Date: Tue, 11 Jul 2006 13:36:03 GMT Message-Id: <200607111336.k6BDa3fH037964@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 101272 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 13:36:10 -0000 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")); }