From owner-freebsd-arch@FreeBSD.ORG Fri Jan 9 11:34:51 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0ADD16A4CE for ; Fri, 9 Jan 2004 11:34:51 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 98D5843D1D for ; Fri, 9 Jan 2004 11:34:49 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 27228 invoked by uid 1002); 9 Jan 2004 19:34:49 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 9 Jan 2004 19:34:49 -0000 Message-ID: <3FFF01F3.7070700@freebsd.org> Date: Fri, 09 Jan 2004 12:33:07 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: arch@FreeBSD.org Subject: Re: Interrupt API change X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2004 19:34:51 -0000 Daniel Eischen wrote: > 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 ? > > > Yes, right after I hit the Send button I realized that I had forgotten to mention this. There will be an enumeration of return codes, but I haven't thought up a good name for them yet. Scott