From owner-p4-projects@FreeBSD.ORG Tue Jun 13 22:21:53 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 042DA16A47A; Tue, 13 Jun 2006 22:21:53 +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 BB37316A474 for ; Tue, 13 Jun 2006 22:21:52 +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 BFC2843D7E for ; Tue, 13 Jun 2006 22:21:44 +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 k5DMJON9000864 for ; Tue, 13 Jun 2006 22:19:24 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5DMJNT7000861 for perforce@freebsd.org; Tue, 13 Jun 2006 22:19:23 GMT (envelope-from piso@freebsd.org) Date: Tue, 13 Jun 2006 22:19:23 GMT Message-Id: <200606132219.k5DMJNT7000861@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 99182 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, 13 Jun 2006 22:21:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=99182 Change 99182 by piso@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);