summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/isa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64/isa')
-rw-r--r--sys/arch/amd64/isa/clock.c5
-rw-r--r--sys/arch/amd64/isa/isa_machdep.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/amd64/isa/clock.c b/sys/arch/amd64/isa/clock.c
index 2132a6e5b63..88d469685c9 100644
--- a/sys/arch/amd64/isa/clock.c
+++ b/sys/arch/amd64/isa/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.4 2004/06/25 11:03:28 art Exp $ */
+/* $OpenBSD: clock.c,v 1.5 2004/06/28 01:52:26 deraadt Exp $ */
/* $NetBSD: clock.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */
/*-
@@ -508,7 +508,8 @@ i8254_initclocks()
* XXX If you're doing strange things with multiple clocks, you might
* want to keep track of clock handlers.
*/
- isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK, clockintr,0,"clock");
+ isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK, clockintr,
+ 0, "clock");
isa_intr_establish(NULL, 8, IST_PULSE, IPL_CLOCK, rtcintr, 0, "rtc");
mc146818_write(NULL, MC_REGA, MC_BASE_32_KHz | MC_RATE_128_Hz);
diff --git a/sys/arch/amd64/isa/isa_machdep.c b/sys/arch/amd64/isa/isa_machdep.c
index 2b3e249e7ae..4487ec16026 100644
--- a/sys/arch/amd64/isa/isa_machdep.c
+++ b/sys/arch/amd64/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.2 2004/06/13 21:49:13 niklas Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.3 2004/06/28 01:52:26 deraadt Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
#define ISA_DMA_STATS
@@ -370,7 +370,8 @@ isa_intr_establish(ic, irq, type, level, ih_fun, ih_arg, ih_what)
struct intrhand **p, *q, *ih;
static struct intrhand fakehand = {fakeintr};
- return intr_establish(irq, &i8259_pic, irq, type, level, ih_fun, ih_arg);
+ return intr_establish(irq, &i8259_pic, irq, type, level, ih_fun,
+ ih_arg, ih_what);
/* no point in sleeping unless someone can free memory. */
ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK);
@@ -426,7 +427,8 @@ isa_intr_establish(ic, irq, type, level, ih_fun, ih_arg, ih_what)
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = irq;
- ih->ih_what = ih_what;
+ evcount_attach(&ih->ih_count, ih_what, (void *)&ih->ih_irq,
+ &evcount_intr);
*p = ih;
return (ih);
@@ -460,6 +462,7 @@ isa_intr_disestablish(ic, arg)
*p = q->ih_next;
else
panic("intr_disestablish: handler not registered");
+ evcount_detach(&ih->ih_count);
free(ih, M_DEVBUF);
if (intrhand[irq] == NULL)