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 ...

John Baldwin jhb at freebsd.org
Mon Oct 31 08:43:24 PST 2005


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 at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-src mailing list