From owner-cvs-all@FreeBSD.ORG Mon Oct 31 16:43:23 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CC0016A448; Mon, 31 Oct 2005 16:43:21 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AF0F43D45; Mon, 31 Oct 2005 16:43:19 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 31 Oct 2005 11:59:55 -0500 From: John Baldwin To: Bruce Evans Date: Mon, 31 Oct 2005 12:23:58 -0500 User-Agent: KMail/1.8.2 References: <200510261648.27126.peter@wemm.org> <20051028.103709.74689710.imp@bsdimp.com> <20051029124828.C30731@delplex.bde.org> In-Reply-To: <20051029124828.C30731@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510311224.00458.jhb@freebsd.org> Cc: src-committers@freebsd.org, peter@wemm.org, cvs-src@freebsd.org, cvs-all@freebsd.org, glebius@freebsd.org, linimon@lonesome.com, Warner Losh Subject: Re: cvs commit: src/sys/alpha/alpha interrupt.c src/sys/alpha/isa isa.c src/sys/amd64/amd64 intr_machdep.c src/sys/amd64/include intr_machdep.h src/sys/amd64/isa atpic.c src/sys/arm/arm intr.c src/sys/dev/sio sio.c src/sys/dev/uart uart_kbd_sun.c uart_tty.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 16:43:23 -0000 On Friday 28 October 2005 11:20 pm, Bruce Evans wrote: > >> is it possible to implement such a feature that driver requests > >> INTR_FAST and it succeds only and only if interrupt isn't shared? > > This is exactly what we had. It doesn't work... > > > Not really. The problem is that you don't know it is shared until it > > is too late. You have no way of really knowing if a device uses > > interrupts until its driver attaches and requests an interrupt. Given > > how we do our device probing, there's not really a chance to > > 'downgrade' the FAST to non-FAST later with driver notification (we > > can trivially downgrade what we do to ithread, but then the driver > > might not actually work). > > Attaching the interrupt only at open time and detaching it at last-close > time would work OK, and is needed anyway to handle timesharing of normal > unshareable isa interrupts (RF_TIMESHARE is another problematic higher > level flag, since it doesn't do anything to make the necessary timesharing > actually work). Problems with this: > - the console device now wants its interrupt enabled at all times, and > doesn't tuen off the interrupt at the device level on close > - programs like getty would keep devices opened and would have to be > killed to let the interrupt wiring change > - interrupt unwiring doesn't work right, partly due to supporting > historical braindamage in ppbus. The interrupt thread should go away > on the last detachment from it, but doesn't. ppbus sets up and > tears down its interrupt for every user-level i/o, since its > timesharing involves a sort of open/close for every i/o. > > RF_SHAREABLE is another problematic higher level flag. sio doesn't set > it for the interrupt resource, so the interrupt should be unshareable, > but interrupt sharing works anyway. Yeah, there's a pretty big disconnect between bus_setup_intr/bus_teardown_intr and the actual IRQ resource they are attached to. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org