Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jan 2004 14:28:47 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Scott Long <scottl@freebsd.org>
Cc:        arch@freebsd.org
Subject:   Re: Interrupt API change
Message-ID:  <Pine.GSO.4.10.10401091425550.10482-100000@pcnet5.pcnet.com>
In-Reply-To: <3FFEFA18.1060805@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Jan 2004, Scott Long wrote:

> All,
> 
> At the September DevSummit, Peter Wemm proposed changing the device
> driver API so that interrupt routines return an INT instead of a VOID.
> The primary purpose of this is two-fold.  The first is so interrupt
> handlers can communicate back to the low-level interrupt routines
> whether or not they were able to handle the interrupt.  Heuristics
> can then be built on this information to better detect things like
> interrupt storms.  This change also paves the way for the proposal
> to make interrupts be multi-tiered.  The first level interrupt handler
> can relay back whether it wants the second-level handler to be run
> (similar to filter interrupt handlers in Max OS X).
> 
> I'm not ready to go in the multi-level interrupt direction just yet,
> but changing the API now will help that later if needed.  The change
> will consist of changing the driver_intr_t typedef in /sys/sys/bus.h
> to return an int, and then doing a sweep of the entire tree.  I expect
> no functional change from this right now.

Coming from a background in Solaris device drivers, I think
is a good idea :)  Can I suggest that instead of just returning
0 or non-zero, that you use something more indicative like
INTR_CLAIMED / INTR_UNCLAIMED ?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10401091425550.10482-100000>