diff options
author | dg <dg@FreeBSD.org> | 1994-08-18 05:09:36 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-18 05:09:36 +0000 |
commit | 7b3218c89f6c5e1d72625d3be9db3a221ea7f330 (patch) | |
tree | 1abd0f0dcf193ac24dd552de50221c9fb30b3610 /sys/isa | |
parent | c87abe4536bb366a683e0f2b5fcaaa67d072ba75 (diff) | |
download | FreeBSD-src-7b3218c89f6c5e1d72625d3be9db3a221ea7f330.zip FreeBSD-src-7b3218c89f6c5e1d72625d3be9db3a221ea7f330.tar.gz |
Bruce Evans' dynamic interrupt support.
/usr/src/sys/i386/isa/clock.c:
o Garrett's statclock changes.
o Wire xxxintr, not Vclk.
o Wire using register_intr(), not setidt().
/usr/src/sys/i386/isa/icu.s:
o Garrett's statclock changes.
o Removed unused variable high_imask.
o Fake int 8 for rtc as well as int 0 for clk. Required for kernel
profiling with statclock, harmless otherwise.
/usr/src/sys/i386/isa/isa.c:
o Allow isdp->id_irq and other things in *isdp to be changed by
probes. Changing interrupts later requires direct calls to
register_intr() and unregister_intr() and more care.
ALLOW_CONFLICT_* is brought over from 1.1.5, except
ALLOW_CONFLICT_IRQ is not supported. IRQ conflict checking is
delayed until after probing so that drivers can change the IRQ
to a free one; real conflicts require more cooperation between
drivers to handle.
o Too many details to list.
o This file requires splitting and a lot more work.
/usr/src/sys/i386/isa/isa_device.h:
o Declare more things more completely.
/usr/src/sys/i386/isa/sio.c:
o Prepare to register interrupt handlers as fast.
/usr/src/sys/i386/isa/vector.s:
o Generate entry code for 16 fast interrupt handlers and 16 normal
interrupt handlers. Changed some constants to variables:
# $unit is now intr_unit[intr]. Type is int. Someday it should
be a cookie suitable for the handler (e.g., a struct com_s for
sio).
# $handler is now intr_handler[intr].
# intrcnt_actv[id_num] is now *intr_countp[intr]. The indirection
is required to get a contiguous range of counters for vmstat
and so that the drivers depend more in the driver than on the
interrupt number (drivers could take turns using an interrupt
and the counts would remain correct). There is a separate
counter for each device and for each stray interrupt. In
1.1.5, stray interrupt 7 clobbers the count for device 7 or
something worse if there is no device 7 :-(.
# mask is now intr_mask[intr] (was already indirect).
o Entry points are now _XintrI and _XfastintrI (I = intr = 0-15),
not _VdevU (U = unit).
o Removed BUILD_VECTORS stuff. There's a trace of it left for
the string table for vmstat but config now generates the
string in one piece because nothing more is required.
o Removed old handling of stray interrupts and older comments
about it.
Submitted by: Bruce Evans
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/atrtc.c | 12 | ||||
-rw-r--r-- | sys/isa/sio.c | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 35f2e42..e3f3f21 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.13 1994/08/13 03:49:56 wollman Exp $ + * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ */ /* @@ -497,16 +497,14 @@ test_inittodr(time_t base) /* * Wire clock interrupt in. */ -#define V(s) __CONCAT(V, s) -extern void V(clk)(); -extern void V(rtc)(); - void enablertclock() { - setidt(ICU_OFFSET+0, &V(clk), SDT_SYS386IGT, SEL_KPL); + register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, clkintr, + HWI_MASK | SWI_MASK, /* unit */ 0); INTREN(IRQ0); - setidt(ICU_OFFSET+8, &V(rtc), SDT_SYS386IGT, SEL_KPL); + register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, rtcintr, + SWI_CLOCK_MASK, /* unit */ 0); INTREN(IRQ8); outb(IO_RTC, RTC_STATUSB); outb(IO_RTC+1, RTCSB_PINTR | RTCSB_24HR); diff --git a/sys/isa/sio.c b/sys/isa/sio.c index de95e90..d505c4d 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.47 1994/05/26 13:31:40 rgrimes Exp $ + * $Id: sio.c,v 1.48 1994/08/13 03:50:13 wollman Exp $ */ #include "sio.h" @@ -427,6 +427,7 @@ sioattach(isdp) int s; int unit; + isdp->id_ri_flags |= RI_FAST; iobase = isdp->id_iobase; unit = isdp->id_unit; s = spltty(); |