From owner-p4-projects@FreeBSD.ORG Tue Jun 13 21:32:33 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 5DFF116A474; Tue, 13 Jun 2006 21:32:33 +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 1C19416A47B for ; Tue, 13 Jun 2006 21:32:33 +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 C353943D49 for ; Tue, 13 Jun 2006 21:32:32 +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 k5DLUCAx096501 for ; Tue, 13 Jun 2006 21:30:12 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5DLUCBe096498 for perforce@freebsd.org; Tue, 13 Jun 2006 21:30:12 GMT (envelope-from piso@freebsd.org) Date: Tue, 13 Jun 2006 21:30:12 GMT Message-Id: <200606132130.k5DLUCBe096498@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 99169 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 21:32:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=99169 Change 99169 by piso@piso_newluxor on 2006/06/13 21:29:27 Bring in some defines from jhb_intr Affected files ... .. //depot/projects/soc2006/intr_filter/i386/conf/GENERIC#2 edit .. //depot/projects/soc2006/intr_filter/sys/bus.h#2 edit Differences ... ==== //depot/projects/soc2006/intr_filter/i386/conf/GENERIC#2 (text+ko) ==== @@ -293,3 +293,5 @@ device firewire # FireWire bus code device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) + +options INTR_FILTER # use interrupt filters when available ==== //depot/projects/soc2006/intr_filter/sys/bus.h#2 (text+ko) ==== @@ -119,9 +119,48 @@ */ #define device_method_t kobj_method_t +#ifdef INTR_FILTER /** - * @brief A driver interrupt service routine + * @brief Driver interrupt filter return values + * + * If a driver provides an interrupt filter routine it must return an + * integer consisting of oring together zero or more of the following + * flags: + * + * FILTER_STRAY - this device did not trigger the interrupt + * FILTER_HANDLED - the interrupt has been fully handled and can be EOId + * FILTER_SCHEDULE_THREAD - the threaded interrupt handler should be + * scheduled to execute + * + * If the driver does not provide a filter, then the interrupt code will + * act is if the filter had returned FILTER_SCHEDULE_THREAD. Note that it + * is illegal to specify any other flag with FILTER_STRAY and that it is + * illegal to not specify either of FILTER_HANDLED or FILTER_SCHEDULE_THREAD + * if FILTER_STRAY is not specified. + */ +#define FILTER_STRAY 0x01 +#define FILTER_HANDLED 0x02 +#define FILTER_SCHEDULE_THREAD 0x04 +#endif + +/** + * @brief Driver interrupt service routines + * + * The filter routine is run in primary interrupt context and may not + * block or use regular mutexes. It may only use spin mutexes for + * synchronization. The filter may either completely handle the + * interrupt or it may perform some of the work and defer more + * expensive work to the regular interrupt handler. If a filter + * routine is not registered by the driver, then the regular interrupt + * handler is always used to handle interrupts from this device. + * + * The regular interrupt handler executes in its own thread context + * and may use regular mutexes. However, it is prohibited from + * sleeping on a sleep queue. */ +#ifdef INTR_FILTER +typedef int driver_filter_t(void*); +#endif typedef void driver_intr_t(void*); /**