Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2005 12:23:58 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        src-committers@freebsd.org, peter@wemm.org, cvs-src@freebsd.org, cvs-all@freebsd.org, glebius@freebsd.org, linimon@lonesome.com, Warner Losh <imp@bsdimp.com>
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 ...
Message-ID:  <200510311224.00458.jhb@freebsd.org>
In-Reply-To: <20051029124828.C30731@delplex.bde.org>
References:  <200510261648.27126.peter@wemm.org> <20051028.103709.74689710.imp@bsdimp.com> <20051029124828.C30731@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510311224.00458.jhb>