Date: Tue, 13 Jun 2006 21:30:12 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 99169 for review Message-ID: <200606132130.k5DLUCBe096498@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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*); /**
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606132130.k5DLUCBe096498>