summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-09-20 06:33:49 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-09-20 06:33:49 +0000
commit3e3ff0cf0db089f1bc7cf6089dc74b51d0a3af70 (patch)
treefdd209a91e26cb3cbc1a90545f99b5db0880c7ce /sys
parentee9bd637e0295eeb7dfd37b2f3810841cbd814f7 (diff)
Get rid of evcount's support for arranging counters in a tree
hierarchy. Everything attached to a single root node anyway, so at best we had a bush. "i think it is good" deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/clock.c4
-rw-r--r--sys/arch/alpha/dev/shared_intr.c5
-rw-r--r--sys/arch/alpha/tc/ioasic.c4
-rw-r--r--sys/arch/alpha/tc/tc_3000_300.c4
-rw-r--r--sys/arch/alpha/tc/tc_3000_500.c4
-rw-r--r--sys/arch/amd64/amd64/intr.c4
-rw-r--r--sys/arch/amd64/amd64/lapic.c6
-rw-r--r--sys/arch/arm/xscale/i80321_clock.c6
-rw-r--r--sys/arch/arm/xscale/i80321_intr.c5
-rw-r--r--sys/arch/arm/xscale/pxa2x0_gpio.c4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_intr.c5
-rw-r--r--sys/arch/aviion/dev/syscon.c5
-rw-r--r--sys/arch/aviion/dev/vme.c5
-rw-r--r--sys/arch/beagle/dev/intc.c5
-rw-r--r--sys/arch/beagle/dev/omgpio.c4
-rw-r--r--sys/arch/hp300/dev/frodo.c4
-rw-r--r--sys/arch/hp300/hp300/clock.c6
-rw-r--r--sys/arch/hp300/hp300/intr.c5
-rw-r--r--sys/arch/hppa/dev/apic.c4
-rw-r--r--sys/arch/hppa/hppa/intr.c6
-rw-r--r--sys/arch/i386/i386/ioapic.c5
-rw-r--r--sys/arch/i386/i386/lapic.c6
-rw-r--r--sys/arch/i386/isa/isa_machdep.c5
-rw-r--r--sys/arch/landisk/landisk/intr.c5
-rw-r--r--sys/arch/loongson/dev/bonito.c4
-rw-r--r--sys/arch/loongson/dev/voyager.c4
-rw-r--r--sys/arch/luna88k/dev/timekeeper.c4
-rw-r--r--sys/arch/luna88k/luna88k/isr.c5
-rw-r--r--sys/arch/mac68k/mac68k/intr.c4
-rw-r--r--sys/arch/mac68k/mac68k/via.c10
-rw-r--r--sys/arch/macppc/dev/macintr.c5
-rw-r--r--sys/arch/macppc/dev/openpic.c17
-rw-r--r--sys/arch/macppc/macppc/clock.c6
-rw-r--r--sys/arch/mips64/mips64/clock.c4
-rw-r--r--sys/arch/mips64/mips64/interrupt.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c4
-rw-r--r--sys/arch/mvme88k/dev/syscon.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c5
-rw-r--r--sys/arch/mvmeppc/dev/openpic.c6
-rw-r--r--sys/arch/sgi/localbus/macebus.c5
-rw-r--r--sys/arch/sgi/pci/ioc.c4
-rw-r--r--sys/arch/sgi/pci/iof.c4
-rw-r--r--sys/arch/sgi/sgi/ip27_machdep.c5
-rw-r--r--sys/arch/sgi/xbow/xbridge.c4
-rw-r--r--sys/arch/sgi/xbow/xheart.c5
-rw-r--r--sys/arch/sh/sh/interrupt.c5
-rw-r--r--sys/arch/socppc/dev/ipic.c4
-rw-r--r--sys/arch/socppc/socppc/clock.c6
-rw-r--r--sys/arch/sparc/dev/amd7930.c4
-rw-r--r--sys/arch/sparc/dev/fd.c4
-rw-r--r--sys/arch/sparc/dev/fga.c4
-rw-r--r--sys/arch/sparc/sparc/intr.c10
-rw-r--r--sys/arch/sparc64/sparc64/intr.c6
-rw-r--r--sys/arch/vax/if/if_le.c5
-rw-r--r--sys/arch/vax/if/if_qe.c5
-rw-r--r--sys/arch/vax/if/if_ze.c5
-rw-r--r--sys/arch/vax/mbus/mbus.c4
-rw-r--r--sys/arch/vax/qbus/dhu.c8
-rw-r--r--sys/arch/vax/qbus/dz_uba.c8
-rw-r--r--sys/arch/vax/qbus/uda.c5
-rw-r--r--sys/arch/vax/vax/clock.c4
-rw-r--r--sys/arch/vax/vsa/asc_vsbus.c5
-rw-r--r--sys/arch/vax/vsa/dz_ibus.c8
-rw-r--r--sys/arch/vax/vsa/hdc9224.c5
-rw-r--r--sys/arch/vax/vsa/if_le_vsbus.c5
-rw-r--r--sys/arch/vax/vsa/if_ze_vsbus.c5
-rw-r--r--sys/arch/vax/vsa/ncr.c5
-rw-r--r--sys/arch/vax/vxt/vxtbus.c4
-rw-r--r--sys/dev/pci/pccbb.c5
-rw-r--r--sys/dev/tc/tcds.c4
-rw-r--r--sys/kern/subr_evcount.c33
-rw-r--r--sys/sys/evcount.h10
72 files changed, 166 insertions, 241 deletions
diff --git a/sys/arch/alpha/alpha/clock.c b/sys/arch/alpha/alpha/clock.c
index c8c46e357bb..9f4fbeb4fd7 100644
--- a/sys/arch/alpha/alpha/clock.c
+++ b/sys/arch/alpha/alpha/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.19 2010/06/30 20:38:49 tedu Exp $ */
+/* $OpenBSD: clock.c,v 1.20 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: clock.c,v 1.29 2000/06/05 21:47:10 thorpej Exp $ */
/*
@@ -132,7 +132,7 @@ cpu_initclocks(void)
platform.clockintr = hardclock;
schedhz = 16;
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
/*
* Get the clock started.
diff --git a/sys/arch/alpha/dev/shared_intr.c b/sys/arch/alpha/dev/shared_intr.c
index d2f76c18b5c..a0fdb4ca9b6 100644
--- a/sys/arch/alpha/dev/shared_intr.c
+++ b/sys/arch/alpha/dev/shared_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shared_intr.c,v 1.16 2009/09/30 20:16:22 miod Exp $ */
+/* $OpenBSD: shared_intr.c,v 1.17 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: shared_intr.c,v 1.13 2000/03/19 01:46:18 thorpej Exp $ */
/*
@@ -170,8 +170,7 @@ alpha_shared_intr_establish(intr, num, type, level, fn, arg, basename)
ih->ih_arg = arg;
ih->ih_level = level;
ih->ih_num = num;
- evcount_attach(&ih->ih_count, basename, (void *)&ih->ih_num,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, basename, &ih->ih_num);
intr[num].intr_sharetype = type;
TAILQ_INSERT_TAIL(&intr[num].intr_q, ih, ih_q);
diff --git a/sys/arch/alpha/tc/ioasic.c b/sys/arch/alpha/tc/ioasic.c
index d3542e8d409..facb9918959 100644
--- a/sys/arch/alpha/tc/ioasic.c
+++ b/sys/arch/alpha/tc/ioasic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioasic.c,v 1.16 2009/11/07 23:01:38 miod Exp $ */
+/* $OpenBSD: ioasic.c,v 1.17 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: ioasic.c,v 1.34 2000/07/18 06:10:06 thorpej Exp $ */
/*-
@@ -230,7 +230,7 @@ ioasic_intr_establish(ioa, cookie, level, func, arg, name)
ioasicintrs[dev].iai_func = func;
ioasicintrs[dev].iai_arg = arg;
- evcount_attach(&ioasicintrs[dev].iai_count, name, NULL, &evcount_intr);
+ evcount_attach(&ioasicintrs[dev].iai_count, name, NULL);
/* Enable interrupts for the device. */
for (i = 0; i < ioasic_ndevs; i++)
diff --git a/sys/arch/alpha/tc/tc_3000_300.c b/sys/arch/alpha/tc/tc_3000_300.c
index a8b507f6983..eae1461e2f0 100644
--- a/sys/arch/alpha/tc/tc_3000_300.c
+++ b/sys/arch/alpha/tc/tc_3000_300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc_3000_300.c,v 1.14 2008/08/09 16:42:29 miod Exp $ */
+/* $OpenBSD: tc_3000_300.c,v 1.15 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: tc_3000_300.c,v 1.26 2001/07/27 00:25:21 thorpej Exp $ */
/*
@@ -130,7 +130,7 @@ tc_3000_300_intr_establish(tcadev, cookie, level, func, arg, name)
tc_3000_300_intr[dev].tci_arg = arg;
if (name != NULL)
evcount_attach(&tc_3000_300_intr[dev].tci_count,
- name, NULL, &evcount_intr);
+ name, NULL);
imskp = (volatile u_int32_t *)(DEC_3000_300_IOASIC_ADDR + IOASIC_IMSK);
switch (dev) {
diff --git a/sys/arch/alpha/tc/tc_3000_500.c b/sys/arch/alpha/tc/tc_3000_500.c
index a85ed01fb05..328f92180d9 100644
--- a/sys/arch/alpha/tc/tc_3000_500.c
+++ b/sys/arch/alpha/tc/tc_3000_500.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc_3000_500.c,v 1.15 2008/08/09 16:42:29 miod Exp $ */
+/* $OpenBSD: tc_3000_500.c,v 1.16 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: tc_3000_500.c,v 1.24 2001/07/27 00:25:21 thorpej Exp $ */
/*
@@ -147,7 +147,7 @@ tc_3000_500_intr_establish(tcadev, cookie, level, func, arg, name)
tc_3000_500_intr[dev].tci_arg = arg;
if (name != NULL)
evcount_attach(&tc_3000_500_intr[dev].tci_count,
- name, NULL, &evcount_intr);
+ name, NULL);
tc_3000_500_imask &= ~tc_3000_500_intrbits[dev];
*(volatile u_int32_t *)TC_3000_500_IMR_WRITE = tc_3000_500_imask;
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c
index 794233f1419..655c0ef64e8 100644
--- a/sys/arch/amd64/amd64/intr.c
+++ b/sys/arch/amd64/amd64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.24 2010/03/01 20:36:32 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.25 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
@@ -444,7 +444,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
ih->ih_pin = pin;
ih->ih_cpu = ci;
ih->ih_slot = slot;
- evcount_attach(&ih->ih_count, what, &source->is_idtvec, &evcount_intr);
+ evcount_attach(&ih->ih_count, what, &source->is_idtvec);
*p = ih;
diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c
index b51932e0a52..5f651ae6e33 100644
--- a/sys/arch/amd64/amd64/lapic.c
+++ b/sys/arch/amd64/amd64/lapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lapic.c,v 1.26 2010/07/25 21:43:38 deraadt Exp $ */
+/* $OpenBSD: lapic.c,v 1.27 2010/09/20 06:33:46 matthew Exp $ */
/* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */
/*-
@@ -244,9 +244,9 @@ lapic_boot_init(paddr_t lapic_base)
idt_allocmap[LAPIC_TIMER_VECTOR] = 1;
idt_vec_set(LAPIC_TIMER_VECTOR, Xintr_lapic_ltimer);
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
#ifdef MULTIPROCESSOR
- evcount_attach(&ipi_count, "ipi", (void *)&ipi_irq, &evcount_intr);
+ evcount_attach(&ipi_count, "ipi", &ipi_irq);
#endif
}
diff --git a/sys/arch/arm/xscale/i80321_clock.c b/sys/arch/arm/xscale/i80321_clock.c
index bdc346ba4e9..dc72db0e0e5 100644
--- a/sys/arch/arm/xscale/i80321_clock.c
+++ b/sys/arch/arm/xscale/i80321_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i80321_clock.c,v 1.8 2008/02/14 19:53:22 drahn Exp $ */
+/* $OpenBSD: i80321_clock.c,v 1.9 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@openbsd.org>
@@ -320,8 +320,8 @@ cpu_initclocks()
ticks_per_intr = ticks_per_second / hz;
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
- evcount_attach(&stat_count, "stat", (void *)&stat_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
+ evcount_attach(&stat_count, "stat", &stat_irq);
(void) i80321_intr_establish(ICU_INT_TMR0, IPL_CLOCK, i80321_intr,
NULL, NULL);
diff --git a/sys/arch/arm/xscale/i80321_intr.c b/sys/arch/arm/xscale/i80321_intr.c
index 40da0d38489..58e032074b7 100644
--- a/sys/arch/arm/xscale/i80321_intr.c
+++ b/sys/arch/arm/xscale/i80321_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i80321_intr.c,v 1.13 2009/08/22 02:54:50 mk Exp $ */
+/* $OpenBSD: i80321_intr.c,v 1.14 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@openbsd.org>
@@ -323,8 +323,7 @@ i80321_intr_establish(int irq, int ipl, int (*func)(void *), void *arg,
iq = &i80321_handler[irq];
if (name != NULL)
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_irq);
/* All IOP321 interrupts are level-triggered. */
iq->iq_ist = IST_LEVEL;
diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c
index e6dc20a4400..9d94b3d4273 100644
--- a/sys/arch/arm/xscale/pxa2x0_gpio.c
+++ b/sys/arch/arm/xscale/pxa2x0_gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_gpio.c,v 1.21 2009/08/22 02:54:50 mk Exp $ */
+/* $OpenBSD: pxa2x0_gpio.c,v 1.22 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -239,7 +239,7 @@ pxa2x0_gpio_intr_establish(u_int gpio, int level, int spl, int (*func)(void *),
gh->gh_gpio = gpio;
gh->gh_irq = gpio+32;
gh->gh_level = level;
- evcount_attach(&gh->gh_count, name, (void *)&gh->gh_irq, &evcount_intr);
+ evcount_attach(&gh->gh_count, name, &gh->gh_irq);
gh->gh_next = sc->sc_handlers[gpio];
sc->sc_handlers[gpio] = gh;
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c
index ff96cfd19c4..20b4d446835 100644
--- a/sys/arch/arm/xscale/pxa2x0_intr.c
+++ b/sys/arch/arm/xscale/pxa2x0_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_intr.c,v 1.20 2009/08/26 20:31:43 deraadt Exp $ */
+/* $OpenBSD: pxa2x0_intr.c,v 1.21 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -567,8 +567,7 @@ pxa2x0_intr_establish(int irqno, int level,
#endif
if (name != NULL)
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_irq);
#ifdef MULTIPLE_HANDLERS_ON_ONE_IRQ
pxa2x0_update_intr_masks();
diff --git a/sys/arch/aviion/dev/syscon.c b/sys/arch/aviion/dev/syscon.c
index 9c6c8920efe..131525d9a6d 100644
--- a/sys/arch/aviion/dev/syscon.c
+++ b/sys/arch/aviion/dev/syscon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscon.c,v 1.5 2010/04/21 19:33:47 miod Exp $ */
+/* $OpenBSD: syscon.c,v 1.6 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
*
@@ -179,8 +179,7 @@ sysconintr_establish(u_int intsrc, struct intrhand *ih, const char *name)
return (EINVAL);
}
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
SLIST_INSERT_HEAD(list, ih, ih_link);
intsrc_enable(intsrc, ih->ih_ipl);
diff --git a/sys/arch/aviion/dev/vme.c b/sys/arch/aviion/dev/vme.c
index 0a6367e6020..7b7e95cb76a 100644
--- a/sys/arch/aviion/dev/vme.c
+++ b/sys/arch/aviion/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.8 2010/04/24 18:44:27 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.9 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
@@ -356,8 +356,7 @@ vmeintr_establish(u_int vec, struct intrhand *ih, const char *name)
}
}
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
SLIST_INSERT_HEAD(list, ih, ih_link);
/*
diff --git a/sys/arch/beagle/dev/intc.c b/sys/arch/beagle/dev/intc.c
index af5f54d7d8d..dca07c81427 100644
--- a/sys/arch/beagle/dev/intc.c
+++ b/sys/arch/beagle/dev/intc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intc.c,v 1.3 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: intc.c,v 1.4 2010/09/20 06:33:48 matthew Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -442,8 +442,7 @@ intc_intr_establish(int irqno, int level, int (*func)(void *),
TAILQ_INSERT_TAIL(&intc_handler[irqno].iq_list, ih, ih_list);
if (name != NULL)
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_irq);
#ifdef DEBUG_INTC
printf("intc_intr_establish irq %d level %d [%s]\n", irqno, level,
diff --git a/sys/arch/beagle/dev/omgpio.c b/sys/arch/beagle/dev/omgpio.c
index 40e6e25353c..cd396333b9c 100644
--- a/sys/arch/beagle/dev/omgpio.c
+++ b/sys/arch/beagle/dev/omgpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omgpio.c,v 1.3 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: omgpio.c,v 1.4 2010/09/20 06:33:48 matthew Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -332,7 +332,7 @@ omgpio_intr_establish(unsigned int gpio, int level, int spl,
sc->sc_handlers[GPIO_PIN_TO_OFFSET(gpio)] = ih;
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_irq);
omgpio_intr_level(gpio, level);
omgpio_intr_unmask(gpio);
diff --git a/sys/arch/hp300/dev/frodo.c b/sys/arch/hp300/dev/frodo.c
index 3cfdab1284b..ecc38fd8452 100644
--- a/sys/arch/hp300/dev/frodo.c
+++ b/sys/arch/hp300/dev/frodo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frodo.c,v 1.12 2008/06/26 05:42:10 ray Exp $ */
+/* $OpenBSD: frodo.c,v 1.13 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: frodo.c,v 1.5 1999/07/31 21:15:20 thorpej Exp $ */
/*-
@@ -302,7 +302,7 @@ frodo_intr_establish(struct device *frdev, int line, struct isr *isr,
/* Install the handler. */
isr->isr_ipl = sc->sc_isr.isr_ipl;
- evcount_attach(&isr->isr_count, name, &isr->isr_ipl, &evcount_intr);
+ evcount_attach(&isr->isr_count, name, &isr->isr_ipl);
sc->sc_intr[line] = isr;
/* Enable the interrupt line. */
diff --git a/sys/arch/hp300/hp300/clock.c b/sys/arch/hp300/hp300/clock.c
index 3431f3e5e58..66b8188ece7 100644
--- a/sys/arch/hp300/hp300/clock.c
+++ b/sys/arch/hp300/hp300/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.13 2005/12/03 21:36:17 brad Exp $ */
+/* $OpenBSD: clock.c,v 1.14 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: clock.c,v 1.20 1997/04/27 20:43:38 thorpej Exp $ */
/*
@@ -253,8 +253,8 @@ cpu_initclocks()
timer3min = statmin;
statprev = statint;
- evcount_attach(&statcnt, "stat", &stat_ipl, &evcount_intr);
- evcount_attach(&clockcnt, "clock", &clock_ipl, &evcount_intr);
+ evcount_attach(&statcnt, "stat", &stat_ipl);
+ evcount_attach(&clockcnt, "clock", &clock_ipl);
/* finally, load hardware */
clk->clk_cr2 = CLK_CR1;
diff --git a/sys/arch/hp300/hp300/intr.c b/sys/arch/hp300/hp300/intr.c
index 48bbc738bdc..88f815797f9 100644
--- a/sys/arch/hp300/hp300/intr.c
+++ b/sys/arch/hp300/hp300/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.23 2009/03/15 20:40:23 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.24 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: intr.c,v 1.5 1998/02/16 20:58:30 thorpej Exp $ */
/*-
@@ -167,8 +167,7 @@ intr_establish(struct isr *isr, const char *name)
panic("intr_establish: bad ipl %d", isr->isr_ipl);
#endif
- evcount_attach(&isr->isr_count, name, &isr->isr_ipl,
- &evcount_intr);
+ evcount_attach(&isr->isr_count, name, &isr->isr_ipl);
/*
* Some devices are particularly sensitive to interrupt
diff --git a/sys/arch/hppa/dev/apic.c b/sys/arch/hppa/dev/apic.c
index e419cf0df0a..59e3c4710ac 100644
--- a/sys/arch/hppa/dev/apic.c
+++ b/sys/arch/hppa/dev/apic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apic.c,v 1.11 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: apic.c,v 1.12 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -188,7 +188,7 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
return (NULL);
}
- evcount_attach(cnt, name, NULL, &evcount_intr);
+ evcount_attach(cnt, name, NULL);
biv = apic_intr_list[irq];
while (biv->next)
biv = biv->next;
diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c
index 5f42f6f57a7..e6ff9249093 100644
--- a/sys/arch/hppa/hppa/intr.c
+++ b/sys/arch/hppa/hppa/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.34 2010/07/01 21:14:01 jsing Exp $ */
+/* $OpenBSD: intr.c,v 1.35 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -193,7 +193,7 @@ cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg,
}
}
- evcount_attach(cnt, name, NULL, &evcount_intr);
+ evcount_attach(cnt, name, NULL);
iv->pri = pri;
iv->irq = irq;
iv->flags = 0;
@@ -247,7 +247,7 @@ cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg,
free(cnt, M_DEVBUF);
iv->cnt = NULL;
} else
- evcount_attach(cnt, name, NULL, &evcount_intr);
+ evcount_attach(cnt, name, NULL);
return (iv);
}
diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c
index 5574d4e5abf..5e61bab1aa5 100644
--- a/sys/arch/i386/i386/ioapic.c
+++ b/sys/arch/i386/i386/ioapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioapic.c,v 1.24 2010/08/08 16:43:19 deraadt Exp $ */
+/* $OpenBSD: ioapic.c,v 1.25 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
/*-
@@ -730,8 +730,7 @@ apic_intr_establish(int irq, int type, int level, int (*ih_fun)(void *),
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = irq;
- evcount_attach(&ih->ih_count, ih_what, (void *)&pin->ip_vector,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, ih_what, &pin->ip_vector);
*p = ih;
diff --git a/sys/arch/i386/i386/lapic.c b/sys/arch/i386/i386/lapic.c
index b0c6e5f01c1..495cff631ca 100644
--- a/sys/arch/i386/i386/lapic.c
+++ b/sys/arch/i386/i386/lapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lapic.c,v 1.30 2010/07/25 21:43:35 deraadt Exp $ */
+/* $OpenBSD: lapic.c,v 1.31 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: lapic.c,v 1.1.2.8 2000/02/23 06:10:50 sommerfeld Exp $ */
/*-
@@ -211,9 +211,9 @@ lapic_boot_init(paddr_t lapic_base)
idt_vec_set(LAPIC_SPURIOUS_VECTOR, Xintrspurious);
idt_vec_set(LAPIC_TIMER_VECTOR, Xintrltimer);
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
#ifdef MULTIPROCESSOR
- evcount_attach(&ipi_count, "ipi", (void *)&ipi_irq, &evcount_intr);
+ evcount_attach(&ipi_count, "ipi", &ipi_irq);
#endif
}
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c
index 3b77563db12..75f9981ddc1 100644
--- a/sys/arch/i386/isa/isa_machdep.c
+++ b/sys/arch/i386/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.69 2010/03/25 22:44:57 oga Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.70 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
/*-
@@ -554,8 +554,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = irq;
- evcount_attach(&ih->ih_count, ih_what, (void *)&ih->ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, ih_what, &ih->ih_irq);
*p = ih;
return (ih);
diff --git a/sys/arch/landisk/landisk/intr.c b/sys/arch/landisk/landisk/intr.c
index 1b76c1abdc4..59f35869a99 100644
--- a/sys/arch/landisk/landisk/intr.c
+++ b/sys/arch/landisk/landisk/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.5 2007/04/09 13:23:25 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.6 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: intr.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -193,8 +193,7 @@ extintr_establish(int irq, int level, int (*ih_fun)(void *), void *ih_arg,
ih->ih_name = ih_name;
if (ih_name != NULL)
- evcount_attach(&ih->ih_count, ih_name, (void *)&ih->ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, ih_name, &ih->ih_irq);
*p = ih;
if (++eih->eih_nih == 1) {
diff --git a/sys/arch/loongson/dev/bonito.c b/sys/arch/loongson/dev/bonito.c
index 52ff0593f7c..57eac9d0e9e 100644
--- a/sys/arch/loongson/dev/bonito.c
+++ b/sys/arch/loongson/dev/bonito.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bonito.c,v 1.16 2010/08/31 10:24:46 pirofti Exp $ */
+/* $OpenBSD: bonito.c,v 1.17 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */
/* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */
@@ -400,7 +400,7 @@ bonito_intr_establish(int irq, int type, int level, int (*handler)(void *),
ih->ih_arg = arg;
ih->ih_level = level;
ih->ih_irq = irq;
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_irq);
s = splhigh();
diff --git a/sys/arch/loongson/dev/voyager.c b/sys/arch/loongson/dev/voyager.c
index 40aa6f2c0a8..19b0b15543c 100644
--- a/sys/arch/loongson/dev/voyager.c
+++ b/sys/arch/loongson/dev/voyager.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: voyager.c,v 1.3 2010/02/26 14:53:11 miod Exp $ */
+/* $OpenBSD: voyager.c,v 1.4 2010/09/20 06:33:48 matthew Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -252,7 +252,7 @@ voyager_intr_establish(void *cookie, int irq, int level, int (*fun)(void *),
nh->ih_arg = arg;
nh->ih_level = level;
nh->ih_irq = irq + BONITO_NINTS;
- evcount_attach(&nh->ih_count, name, (void *)&nh->ih_irq, &evcount_intr);
+ evcount_attach(&nh->ih_count, name, &nh->ih_irq);
if (sc->sc_intr[irq] == NULL)
sc->sc_intr[irq] = nh;
diff --git a/sys/arch/luna88k/dev/timekeeper.c b/sys/arch/luna88k/dev/timekeeper.c
index d6bf7faaa6e..9445953af18 100644
--- a/sys/arch/luna88k/dev/timekeeper.c
+++ b/sys/arch/luna88k/dev/timekeeper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: timekeeper.c,v 1.4 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: timekeeper.c,v 1.5 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: timekeeper.c,v 1.1 2000/01/05 08:48:56 nisimura Exp $ */
/*-
@@ -126,7 +126,7 @@ clock_attach(parent, self, aux)
break;
}
- evcount_attach(&sc->sc_count, self->dv_xname, (void *)&ma->ma_ilvl, &evcount_intr);
+ evcount_attach(&sc->sc_count, self->dv_xname, &ma->ma_ilvl);
clockattach(&sc->sc_dev, clockwork, &sc->sc_count);
}
diff --git a/sys/arch/luna88k/luna88k/isr.c b/sys/arch/luna88k/luna88k/isr.c
index 987ef82e107..afc031d44e4 100644
--- a/sys/arch/luna88k/luna88k/isr.c
+++ b/sys/arch/luna88k/luna88k/isr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isr.c,v 1.7 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: isr.c,v 1.8 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: isr.c,v 1.5 2000/07/09 08:08:20 nisimura Exp $ */
/*-
@@ -87,8 +87,7 @@ isrlink_autovec(int (*func)(void *), void *arg, int ipl, int priority,
newisr->isr_arg = arg;
newisr->isr_ipl = ipl;
newisr->isr_priority = priority;
- evcount_attach(&newisr->isr_count, name, (void *)&newisr->isr_ipl,
- &evcount_intr);
+ evcount_attach(&newisr->isr_count, name, &newisr->isr_ipl);
/*
* Some devices are particularly sensitive to interrupt
diff --git a/sys/arch/mac68k/mac68k/intr.c b/sys/arch/mac68k/mac68k/intr.c
index 9e2c2bbea58..42557df9fb5 100644
--- a/sys/arch/mac68k/mac68k/intr.c
+++ b/sys/arch/mac68k/mac68k/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.13 2009/03/15 20:40:25 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.14 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: intr.c,v 1.2 1998/08/25 04:03:56 scottr Exp $ */
/*-
@@ -145,7 +145,7 @@ intr_establish(int (*func)(void *), void *arg, int ipl, const char *name)
ih->ih_fn = func;
ih->ih_arg = arg;
ih->ih_ipl = ipl;
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
}
/*
diff --git a/sys/arch/mac68k/mac68k/via.c b/sys/arch/mac68k/mac68k/via.c
index d6c0b3e5d6f..ed645bd5297 100644
--- a/sys/arch/mac68k/mac68k/via.c
+++ b/sys/arch/mac68k/mac68k/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.32 2009/03/15 20:40:25 miod Exp $ */
+/* $OpenBSD: via.c,v 1.33 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: via.c,v 1.62 1997/09/10 04:38:48 scottr Exp $ */
/*-
@@ -328,7 +328,7 @@ add_nubus_intr(int slot, int ipl, int (*func)(void *), void *client_data,
ih->ih_fn = func;
ih->ih_arg = client_data;
ih->ih_ipl = ipl;
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
nubus_intr_mask |= 1 << slot;
@@ -497,8 +497,7 @@ via1_register_irq(int irq, int (*irq_func)(void *), void *client_data,
ih->ih_arg = client_data;
ih->ih_ipl = irq;
if (name != NULL)
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
}
int
@@ -512,8 +511,7 @@ via2_register_irq(struct via2hand *vh, const char *name)
#endif
if (name != NULL)
- evcount_attach(&vh->vh_count, name, (void *)&vh->vh_ipl,
- &evcount_intr);
+ evcount_attach(&vh->vh_count, name, &vh->vh_ipl);
SLIST_INSERT_HEAD(&via2intrs[irq], vh, v2h_link);
return (0);
}
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index c73e45c0d9b..28dfdd6f5c1 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.39 2009/10/01 20:19:18 kettenis Exp $ */
+/* $OpenBSD: macintr.c,v 1.40 2010/09/20 06:33:47 matthew Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -288,8 +288,7 @@ printf("vI %d ", irq);
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = irq;
- evcount_attach(&ih->ih_count, name, (void *)&m_hwirq[irq],
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &m_hwirq[irq]);
*p = ih;
return (ih);
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index baae59719db..175db440e22 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.61 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: openpic.c,v 1.62 2010/09/20 06:33:47 matthew Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -290,8 +290,7 @@ printf("vI %d ", irq);
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = irq;
- evcount_attach(&ih->ih_count, name, (void *)&o_hwirq[irq],
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &o_hwirq[irq]);
*p = ih;
return (ih);
@@ -789,14 +788,10 @@ openpic_init()
x |= (15 << OPENPIC_PRIORITY_SHIFT) | IPI_VECTOR_DDB;
openpic_write(OPENPIC_IPI_VECTOR(1), x);
- evcount_attach(&ipi_nop[0], "ipi_nop0", (void *)&ipi_nopirq,
- &evcount_intr);
- evcount_attach(&ipi_nop[1], "ipi_nop1", (void *)&ipi_nopirq,
- &evcount_intr);
- evcount_attach(&ipi_ddb[0], "ipi_ddb0", (void *)&ipi_ddbirq,
- &evcount_intr);
- evcount_attach(&ipi_ddb[1], "ipi_ddb1", (void *)&ipi_ddbirq,
- &evcount_intr);
+ evcount_attach(&ipi_nop[0], "ipi_nop0", &ipi_nopirq);
+ evcount_attach(&ipi_nop[1], "ipi_nop1", &ipi_nopirq);
+ evcount_attach(&ipi_ddb[0], "ipi_ddb0", &ipi_ddbirq);
+ evcount_attach(&ipi_ddb[1], "ipi_ddb1", &ipi_ddbirq);
#endif
/* XXX set spurious intr vector */
diff --git a/sys/arch/macppc/macppc/clock.c b/sys/arch/macppc/macppc/clock.c
index bab7bca11f6..c3d88efbe81 100644
--- a/sys/arch/macppc/macppc/clock.c
+++ b/sys/arch/macppc/macppc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.30 2009/10/01 20:19:18 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.31 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -316,8 +316,8 @@ cpu_initclocks()
statvar >>= 1;
statmin = statint - (statvar >> 1);
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
- evcount_attach(&stat_count, "stat", (void *)&stat_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
+ evcount_attach(&stat_count, "stat", &stat_irq);
cpu_startclock();
diff --git a/sys/arch/mips64/mips64/clock.c b/sys/arch/mips64/mips64/clock.c
index 0107a74ca6b..4237351a1d7 100644
--- a/sys/arch/mips64/mips64/clock.c
+++ b/sys/arch/mips64/mips64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.33 2010/02/28 17:23:25 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.34 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -94,7 +94,7 @@ clockattach(struct device *parent, struct device *self, void *aux)
* be computed correctly.
*/
set_intr(INTPRI_CLOCK, CR_INT_5, clock_int5);
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
/* try to avoid getting clock interrupts early */
cp0_set_compare(cp0_get_count() - 1);
}
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index 4ee5e9b8c8f..fc7e579d8ae 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.59 2010/04/21 03:03:26 deraadt Exp $ */
+/* $OpenBSD: interrupt.c,v 1.60 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -164,8 +164,7 @@ set_intr(int pri, uint32_t mask,
uint32_t (*int_hand)(uint32_t, struct trap_frame *))
{
if ((idle_mask & SOFT_INT_MASK) == 0)
- evcount_attach(&soft_count, "soft", (void *)&soft_irq,
- &evcount_intr);
+ evcount_attach(&soft_count, "soft", &soft_irq);
if (pri < 0 || pri >= NLOWINT)
panic("set_intr: too high priority (%d), increase NLOWINT",
pri);
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index 7801d574e3b..64288da48d8 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.70 2010/07/02 19:57:14 tedu Exp $ */
+/* $OpenBSD: trap.c,v 1.71 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -1101,7 +1101,7 @@ intr_establish(vec, ih, name)
}
}
- evcount_attach(&ih->ih_count, name, &ih->ih_ipl, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
SLIST_INSERT_HEAD(list, ih, ih_link);
return (0);
}
diff --git a/sys/arch/mvme88k/dev/syscon.c b/sys/arch/mvme88k/dev/syscon.c
index 10811cba4b1..b9b33fed552 100644
--- a/sys/arch/mvme88k/dev/syscon.c
+++ b/sys/arch/mvme88k/dev/syscon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscon.c,v 1.28 2007/12/27 23:17:53 miod Exp $ */
+/* $OpenBSD: syscon.c,v 1.29 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -173,8 +173,7 @@ sysconintr_establish(u_int intsrc, struct intrhand *ih, const char *name)
return (EINVAL);
}
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
SLIST_INSERT_HEAD(list, ih, ih_link);
syscon_intsrc_enable(intsrc, ih->ih_ipl);
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 0d27b9e4c3b..1b5dd8eb083 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.237 2010/06/27 12:41:23 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.238 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -777,8 +777,7 @@ intr_establish(int vec, struct intrhand *ih, const char *name)
}
}
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_ipl,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
SLIST_INSERT_HEAD(list, ih, ih_link);
#ifdef MVME188
diff --git a/sys/arch/mvmeppc/dev/openpic.c b/sys/arch/mvmeppc/dev/openpic.c
index df7d85f3f83..b4220d0e07a 100644
--- a/sys/arch/mvmeppc/dev/openpic.c
+++ b/sys/arch/mvmeppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.22 2007/05/29 18:10:43 miod Exp $ */
+/* $OpenBSD: openpic.c,v 1.23 2010/09/20 06:33:47 matthew Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -329,7 +329,7 @@ i8259_intr_establish(lcv, irq, type, level, ih_fun, ih_arg, what)
ih->ih_level = level;
ih->ih_irq = irq;
ih->ih_what = what;
- evcount_attach(&ih->ih_count, what, (void *)&ih->ih_irq, &evcount_intr);
+ evcount_attach(&ih->ih_count, what, &ih->ih_irq);
*p = ih;
return (ih);
@@ -412,7 +412,7 @@ openpic_intr_establish(lcv, irq, type, level, ih_fun, ih_arg, what)
ih->ih_level = level;
ih->ih_irq = irq;
ih->ih_what = what;
- evcount_attach(&ih->ih_count, what, (void *)&ih->ih_irq, &evcount_intr);
+ evcount_attach(&ih->ih_count, what, (void *)&ih->ih_irq);
*p = ih;
return (ih);
diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c
index 1c2421b4b8b..9ab9b0daf91 100644
--- a/sys/arch/sgi/localbus/macebus.c
+++ b/sys/arch/sgi/localbus/macebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macebus.c,v 1.57 2010/08/23 16:56:18 miod Exp $ */
+/* $OpenBSD: macebus.c,v 1.58 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
@@ -500,8 +500,7 @@ macebus_intr_establish(int irq, uint32_t mace_irqmask, int type, int level,
ih->ih.ih_level = level;
ih->ih.ih_irq = irq;
ih->mace_irqmask = mace_irqmask;
- evcount_attach(&ih->ih.ih_count, ih_what, (void *)&ih->ih.ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih.ih_count, ih_what, &ih->ih.ih_irq);
s = splhigh();
diff --git a/sys/arch/sgi/pci/ioc.c b/sys/arch/sgi/pci/ioc.c
index 0e796d598a2..2fea8b271c8 100644
--- a/sys/arch/sgi/pci/ioc.c
+++ b/sys/arch/sgi/pci/ioc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioc.c,v 1.35 2010/05/09 18:37:45 miod Exp $ */
+/* $OpenBSD: ioc.c,v 1.36 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2008 Joel Sing.
@@ -774,7 +774,7 @@ ioc_intr_establish(void *cookie, u_long dev, int level, int (*func)(void *),
ii->ii_arg = arg;
ii->ii_level = level;
- evcount_attach(&ii->ii_count, name, &ii->ii_level, &evcount_intr);
+ evcount_attach(&ii->ii_count, name, &ii->ii_level);
sc->sc_intr[dev] = ii;
/* enable hardware source if necessary */
diff --git a/sys/arch/sgi/pci/iof.c b/sys/arch/sgi/pci/iof.c
index ba03717eb02..cf1b7bbf7ce 100644
--- a/sys/arch/sgi/pci/iof.c
+++ b/sys/arch/sgi/pci/iof.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iof.c,v 1.6 2010/04/06 19:12:34 miod Exp $ */
+/* $OpenBSD: iof.c,v 1.7 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -284,7 +284,7 @@ iof_intr_establish(void *cookie, uint dev, int level, int (*func)(void *),
ii->ii_arg = arg;
ii->ii_level = level;
- evcount_attach(&ii->ii_count, name, &ii->ii_level, &evcount_intr);
+ evcount_attach(&ii->ii_count, name, &ii->ii_level);
sc->sc_intr[dev] = ii;
/* enable hardware source if necessary */
diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c
index 8260cccdca1..175252b8456 100644
--- a/sys/arch/sgi/sgi/ip27_machdep.c
+++ b/sys/arch/sgi/sgi/ip27_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip27_machdep.c,v 1.51 2010/05/09 18:37:47 miod Exp $ */
+/* $OpenBSD: ip27_machdep.c,v 1.52 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -716,8 +716,7 @@ ip27_hub_intr_establish(int (*func)(void *), void *arg, int intrbit,
ih->ih_level = level;
ih->ih_irq = intrbit;
if (name != NULL)
- evcount_attach(&ih->ih_count, name, &ih->ih_level,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_level);
s = splhigh();
diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c
index 188fcc047e8..83292a7420a 100644
--- a/sys/arch/sgi/xbow/xbridge.c
+++ b/sys/arch/sgi/xbow/xbridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbridge.c,v 1.74 2010/08/23 16:56:18 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.75 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -1071,7 +1071,7 @@ xbridge_intr_establish(void *cookie, pci_intr_handle_t ih, int level,
xih->xih_arg = arg;
xih->xih_level = level;
xih->xih_device = device;
- evcount_attach(&xih->xih_count, name, &xi->xi_intrsrc, &evcount_intr);
+ evcount_attach(&xih->xih_count, name, &xi->xi_intrsrc);
LIST_INSERT_HEAD(&xi->xi_handlers, xih, xih_nxt);
if (new) {
diff --git a/sys/arch/sgi/xbow/xheart.c b/sys/arch/sgi/xbow/xheart.c
index 88b0f640cb7..1021cd7937f 100644
--- a/sys/arch/sgi/xbow/xheart.c
+++ b/sys/arch/sgi/xbow/xheart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xheart.c,v 1.19 2009/11/26 23:32:46 syuu Exp $ */
+/* $OpenBSD: xheart.c,v 1.20 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -326,8 +326,7 @@ xheart_intr_establish(int (*func)(void *), void *arg, int intrbit,
ih->ih_level = level;
ih->ih_irq = intrbit;
if (name != NULL)
- evcount_attach(&ih->ih_count, name, &ih->ih_level,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_level);
s = splhigh();
diff --git a/sys/arch/sh/sh/interrupt.c b/sys/arch/sh/sh/interrupt.c
index 17ff868bb6c..3aed3e0238a 100644
--- a/sys/arch/sh/sh/interrupt.c
+++ b/sys/arch/sh/sh/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.10 2009/04/19 18:54:06 oga Exp $ */
+/* $OpenBSD: interrupt.c,v 1.11 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: interrupt.c,v 1.18 2006/01/25 00:02:57 uwe Exp $ */
/*-
@@ -135,8 +135,7 @@ intc_intr_establish(int evtcode, int trigger, int level,
ih->ih_irq = evtcode >> 5;
ih->ih_name = name;
if (name)
- evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq,
- &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_irq);
/* Map interrupt handler */
EVTCODE_TO_IH_INDEX(evtcode) = ih->ih_idx;
diff --git a/sys/arch/socppc/dev/ipic.c b/sys/arch/socppc/dev/ipic.c
index 0327894dcd9..389fc44f007 100644
--- a/sys/arch/socppc/dev/ipic.c
+++ b/sys/arch/socppc/dev/ipic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipic.c,v 1.12 2010/03/03 21:52:13 kettenis Exp $ */
+/* $OpenBSD: ipic.c,v 1.13 2010/09/20 06:33:48 matthew Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -292,7 +292,7 @@ intr_establish(int ivec, int type, int level,
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = ivec;
- evcount_attach(&ih->ih_count, name, NULL, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, NULL);
*p = ih;
if (sc) {
diff --git a/sys/arch/socppc/socppc/clock.c b/sys/arch/socppc/socppc/clock.c
index 4a3d87d3fb5..d063e72bfd1 100644
--- a/sys/arch/socppc/socppc/clock.c
+++ b/sys/arch/socppc/socppc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.7 2009/10/01 20:19:19 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.8 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -262,8 +262,8 @@ cpu_initclocks(void)
statvar >>= 1;
statmin = statint - (statvar >> 1);
- evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr);
- evcount_attach(&stat_count, "stat", (void *)&stat_irq, &evcount_intr);
+ evcount_attach(&clk_count, "clock", &clk_irq);
+ evcount_attach(&stat_count, "stat", &stat_irq);
ticks_per_intr = ticks_per_sec / hz;
cpu_startclock();
diff --git a/sys/arch/sparc/dev/amd7930.c b/sys/arch/sparc/dev/amd7930.c
index 410c123ead6..e82dd265a00 100644
--- a/sys/arch/sparc/dev/amd7930.c
+++ b/sys/arch/sparc/dev/amd7930.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amd7930.c,v 1.33 2010/07/15 03:43:11 jakemsr Exp $ */
+/* $OpenBSD: amd7930.c,v 1.34 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: amd7930.c,v 1.37 1998/03/30 14:23:40 pk Exp $ */
/*
@@ -299,7 +299,7 @@ amd7930attach(parent, self, args)
if (intr_fasttrap(pri, amd7930_trap, amd7930_shareintr, sc) == 0) {
auiop = &sc->sc_au;
evcount_attach(&sc->sc_hwih.ih_count, sc->sc_dev.dv_xname,
- &sc->sc_hwih.ih_vec, &evcount_intr);
+ &sc->sc_hwih.ih_vec);
} else {
#ifdef AUDIO_DEBUG
printf("%s: unable to register fast trap handler\n",
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index c4f3feac8d4..97fcecb84f1 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.75 2010/09/08 14:47:10 jsing Exp $ */
+/* $OpenBSD: fd.c,v 1.76 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -426,7 +426,7 @@ fdcattach(parent, self, aux)
return;
}
evcount_attach(&fdc->sc_hih.ih_count, self->dv_xname,
- &fdc->sc_hih.ih_vec, &evcount_intr);
+ &fdc->sc_hih.ih_vec);
#endif
fdc->sc_sih = softintr_establish(IPL_FDSOFT, fdcswintr, fdc);
diff --git a/sys/arch/sparc/dev/fga.c b/sys/arch/sparc/dev/fga.c
index 8629f1e270a..25247aace7e 100644
--- a/sys/arch/sparc/dev/fga.c
+++ b/sys/arch/sparc/dev/fga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fga.c,v 1.15 2006/02/22 22:32:12 miod Exp $ */
+/* $OpenBSD: fga.c,v 1.16 2010/09/20 06:33:47 matthew Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -535,7 +535,7 @@ fga_intr_establish(sc, vec, level, ih, name)
}
ih->ih_vec = level;
- evcount_attach(&ih->ih_count, name, &ih->ih_vec, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_vec);
/* setup hardware handler */
fga_hwintr_establish(sc, level_to_sint[level]);
diff --git a/sys/arch/sparc/sparc/intr.c b/sys/arch/sparc/sparc/intr.c
index 3509ce4c5cb..60341b662ec 100644
--- a/sys/arch/sparc/sparc/intr.c
+++ b/sys/arch/sparc/sparc/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.34 2010/07/10 19:32:25 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.35 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: intr.c,v 1.20 1997/07/29 09:42:03 fair Exp $ */
/*
@@ -177,11 +177,9 @@ void
intr_init()
{
level10.ih_vec = level10.ih_ipl >> 8;
- evcount_attach(&level10.ih_count, "clock", &level10.ih_vec,
- &evcount_intr);
+ evcount_attach(&level10.ih_count, "clock", &level10.ih_vec);
level14.ih_vec = level14.ih_ipl >> 8;
- evcount_attach(&level14.ih_count, "prof", &level14.ih_vec,
- &evcount_intr);
+ evcount_attach(&level14.ih_count, "prof", &level14.ih_vec);
softnet_ih = softintr_establish(IPL_SOFTNET, softnet, NULL);
}
@@ -297,7 +295,7 @@ intr_establish(level, ih, ipl_block, name)
ih->ih_vec = ipl_block;
ih->ih_ipl = (ipl_block << 8);
if (name != NULL)
- evcount_attach(&ih->ih_count, name, &ih->ih_vec, &evcount_intr);
+ evcount_attach(&ih->ih_count, name, &ih->ih_vec);
s = splhigh();
diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c
index d034d6f5a06..940298d6337 100644
--- a/sys/arch/sparc64/sparc64/intr.c
+++ b/sys/arch/sparc64/sparc64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.36 2010/07/07 15:35:23 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.37 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */
/*
@@ -228,9 +228,9 @@ intr_establish(int level, struct intrhand *ih)
panic("intr_establish: bad intr number %x", ih->ih_number);
if (strlen(ih->ih_name) == 0)
- evcount_attach(&ih->ih_count, "unknown", NULL, &evcount_intr);
+ evcount_attach(&ih->ih_count, "unknown", NULL);
else
- evcount_attach(&ih->ih_count, ih->ih_name, NULL, &evcount_intr);
+ evcount_attach(&ih->ih_count, ih->ih_name, NULL);
q = intrlev[ih->ih_number];
if (q == NULL) {
diff --git a/sys/arch/vax/if/if_le.c b/sys/arch/vax/if/if_le.c
index bedd2e4010d..9a1f4a18ea8 100644
--- a/sys/arch/vax/if/if_le.c
+++ b/sys/arch/vax/if/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.16 2008/10/22 23:04:45 mpf Exp $ */
+/* $OpenBSD: if_le.c,v 1.17 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: if_le.c,v 1.14 1999/08/14 18:40:23 ragge Exp $ */
/*-
@@ -174,8 +174,7 @@ le_ibus_attach(parent, self, aux)
return;
scb_vecalloc(sc->sc_vec, (void *)am7990_intr, sc,
SCB_ISTACK, &sc->sc_intrcnt);
- evcount_attach(&sc->sc_intrcnt, self->dv_xname,
- (void *)&sc->sc_vec, &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname, &sc->sc_vec);
printf(": vec %d ipl %x\n%s", sc->sc_vec, br, self->dv_xname);
/*
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c
index dfd60210414..7d815f78543 100644
--- a/sys/arch/vax/if/if_qe.c
+++ b/sys/arch/vax/if/if_qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qe.c,v 1.24 2008/11/28 02:44:17 brad Exp $ */
+/* $OpenBSD: if_qe.c,v 1.25 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -314,8 +314,7 @@ qeattach(struct device *parent, struct device *self, void *aux)
uba_intr_establish(ua->ua_icookie, ua->ua_cvec, qeintr,
sc, &sc->sc_intrcnt);
sc->sc_cvec = ua->ua_cvec;
- evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_cvec, &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname, &sc->sc_cvec);
strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, sizeof ifp->if_xname);
ifp->if_softc = sc;
diff --git a/sys/arch/vax/if/if_ze.c b/sys/arch/vax/if/if_ze.c
index 51f8dd5db85..ca78bd5e1e7 100644
--- a/sys/arch/vax/if/if_ze.c
+++ b/sys/arch/vax/if/if_ze.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ze.c,v 1.8 2008/08/22 17:09:06 deraadt Exp $ */
+/* $OpenBSD: if_ze.c,v 1.9 2010/09/20 06:33:47 matthew Exp $ */
/* $NetBSD: if_ze.c,v 1.3 2000/01/24 02:54:03 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -127,8 +127,7 @@ zeattach(parent, self, aux)
scb_vecalloc(SGECVEC, (void (*)(void *)) sgec_intr, sc,
SCB_ISTACK, &sc->sc_intrcnt);
- evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_intvec, &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname, &sc->sc_intvec);
sgec_attach(sc);
}
diff --git a/sys/arch/vax/mbus/mbus.c b/sys/arch/vax/mbus/mbus.c
index 92fdd1799f7..5a4aad494fb 100644
--- a/sys/arch/vax/mbus/mbus.c
+++ b/sys/arch/vax/mbus/mbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbus.c,v 1.2 2008/09/22 19:45:35 miod Exp $ */
+/* $OpenBSD: mbus.c,v 1.3 2010/09/20 06:33:48 matthew Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -403,7 +403,7 @@ mbus_intr_establish(unsigned int vec, int ipl, int (*fn)(void *), void *arg,
fi->fi_fn = fn;
fi->fi_arg = arg;
fi->fi_ipl = ipl;
- evcount_attach(&fi->fi_cnt, name, &fi->fi_ipl, &evcount_intr);
+ evcount_attach(&fi->fi_cnt, name, &fi->fi_ipl);
fbicirq = MBUS_VECTOR_TO_IRQ(vec);
fbic->firq[fbicirq] = fi;
diff --git a/sys/arch/vax/qbus/dhu.c b/sys/arch/vax/qbus/dhu.c
index 04b2ee25c24..5eb6aac05dd 100644
--- a/sys/arch/vax/qbus/dhu.c
+++ b/sys/arch/vax/qbus/dhu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhu.c,v 1.18 2010/07/02 17:27:01 nicm Exp $ */
+/* $OpenBSD: dhu.c,v 1.19 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */
/*
* Copyright (c) 2003, Hugh Graham.
@@ -261,11 +261,9 @@ dhu_attach(parent, self, aux)
dhuxint, sc, &sc->sc_tintrcnt);
sc->sc_rcvec = ua->ua_cvec;
- evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_rcvec, &evcount_intr);
+ evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname, &sc->sc_rcvec);
sc->sc_tcvec = ua->ua_cvec + 4;
- evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_tcvec, &evcount_intr);
+ evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname, &sc->sc_tcvec);
}
/* Receiver Interrupt */
diff --git a/sys/arch/vax/qbus/dz_uba.c b/sys/arch/vax/qbus/dz_uba.c
index 5c64cc823f2..151c29865f9 100644
--- a/sys/arch/vax/qbus/dz_uba.c
+++ b/sys/arch/vax/qbus/dz_uba.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dz_uba.c,v 1.6 2006/07/29 17:06:27 miod Exp $ */
+/* $OpenBSD: dz_uba.c,v 1.7 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: dz_uba.c,v 1.11 2000/06/04 06:17:02 matt Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -138,10 +138,8 @@ dz_uba_attach(parent, self, aux)
dzrint, sc, &sc->sc_rintrcnt);
uba_reset_establish(dzreset, self);
- evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_rcvec, &evcount_intr);
- evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_tcvec, &evcount_intr);
+ evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname, &sc->sc_rcvec);
+ evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname, &sc->sc_tcvec);
dzattach(sc);
}
diff --git a/sys/arch/vax/qbus/uda.c b/sys/arch/vax/qbus/uda.c
index 41df2a07364..1db6997767d 100644
--- a/sys/arch/vax/qbus/uda.c
+++ b/sys/arch/vax/qbus/uda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uda.c,v 1.7 2009/12/16 06:56:40 deraadt Exp $ */
+/* $OpenBSD: uda.c,v 1.8 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -200,8 +200,7 @@ udaattach(parent, self, aux)
udaintr, sc, &sc->sc_intrcnt);
uba_reset_establish(udareset, &sc->sc_dev);
sc->sc_cvec = ua->ua_cvec;
- evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_cvec, &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname, &sc->sc_cvec);
sc->sc_iot = ua->ua_iot;
sc->sc_iph = ua->ua_ioh;
diff --git a/sys/arch/vax/vax/clock.c b/sys/arch/vax/vax/clock.c
index 085e580f1d7..4233ff11812 100644
--- a/sys/arch/vax/vax/clock.c
+++ b/sys/arch/vax/vax/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.21 2008/08/18 23:19:29 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.22 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: clock.c,v 1.35 2000/06/04 06:16:58 matt Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
@@ -177,7 +177,7 @@ cpu_initclocks()
if (vax_boardtype != VAX_BTYP_VXT)
mtpr(-10000, PR_NICR); /* Load in count register */
mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */
- evcount_attach(&clock_intrcnt, "clock", NULL, &evcount_intr);
+ evcount_attach(&clock_intrcnt, "clock", NULL);
}
/*
diff --git a/sys/arch/vax/vsa/asc_vsbus.c b/sys/arch/vax/vsa/asc_vsbus.c
index 204d9ad0c01..d9251583c2f 100644
--- a/sys/arch/vax/vsa/asc_vsbus.c
+++ b/sys/arch/vax/vsa/asc_vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc_vsbus.c,v 1.12 2010/06/28 18:31:01 krw Exp $ */
+/* $OpenBSD: asc_vsbus.c,v 1.13 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: asc_vsbus.c,v 1.22 2001/02/04 20:36:32 ragge Exp $ */
/*-
@@ -263,8 +263,7 @@ asc_vsbus_attach(struct device *parent, struct device *self, void *aux)
scb_vecalloc(va->va_cvec, (void (*)(void *)) ncr53c9x_intr,
&asc->sc_ncr53c9x, SCB_ISTACK, &asc->sc_intrcnt);
asc->sc_cvec = va->va_cvec;
- evcount_attach(&asc->sc_intrcnt, self->dv_xname,
- (void *)&asc->sc_cvec, &evcount_intr);
+ evcount_attach(&asc->sc_intrcnt, self->dv_xname, &asc->sc_cvec);
/*
* XXX More of this should be in ncr53c9x_attach(), but
diff --git a/sys/arch/vax/vsa/dz_ibus.c b/sys/arch/vax/vsa/dz_ibus.c
index fdf3c3e8214..df0f64de58c 100644
--- a/sys/arch/vax/vsa/dz_ibus.c
+++ b/sys/arch/vax/vsa/dz_ibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dz_ibus.c,v 1.27 2008/08/24 14:52:08 miod Exp $ */
+/* $OpenBSD: dz_ibus.c,v 1.28 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: dz_ibus.c,v 1.15 1999/08/27 17:50:42 ragge Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
@@ -147,10 +147,8 @@ dz_vsbus_attach(parent, self, aux)
scb_vecalloc(sc->sc_rcvec, dzxint, sc, SCB_ISTACK, &sc->sc_tintrcnt);
sc->sc_tcvec = va->va_cvec - 4;
scb_vecalloc(sc->sc_tcvec, dzrint, sc, SCB_ISTACK, &sc->sc_rintrcnt);
- evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_rcvec, &evcount_intr);
- evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_tcvec, &evcount_intr);
+ evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname, &sc->sc_rcvec);
+ evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname, &sc->sc_tcvec);
printf("4 lines");
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index a47e356b635..18020d066c5 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdc9224.c,v 1.30 2010/09/08 14:47:10 jsing Exp $ */
+/* $OpenBSD: hdc9224.c,v 1.31 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -275,8 +275,7 @@ hdcattach(struct device *parent, struct device *self, void *aux)
* Get interrupt vector, enable instrumentation.
*/
scb_vecalloc(va->va_cvec, hdcintr, sc, SCB_ISTACK, &sc->sc_intrcnt);
- evcount_attach(&sc->sc_intrcnt, self->dv_xname, (void *)va->va_cvec,
- &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname, va->va_cvec);
sc->sc_regs = vax_map_physmem(va->va_paddr, 1);
sc->sc_dmabase = (caddr_t)va->va_dmaaddr;
diff --git a/sys/arch/vax/vsa/if_le_vsbus.c b/sys/arch/vax/vsa/if_le_vsbus.c
index c6e046aa3d3..35cedb075cb 100644
--- a/sys/arch/vax/vsa/if_le_vsbus.c
+++ b/sys/arch/vax/vsa/if_le_vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_vsbus.c,v 1.11 2008/06/26 05:42:14 ray Exp $ */
+/* $OpenBSD: if_le_vsbus.c,v 1.12 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: if_le_vsbus.c,v 1.10 2000/06/29 07:14:18 mrg Exp $ */
/*-
@@ -216,8 +216,7 @@ le_vsbus_attach(parent, self, aux)
scb_vecalloc(va->va_cvec, (void (*)(void *)) am7990_intr, sc,
SCB_ISTACK, &sc->sc_intrcnt);
cvec = va->va_cvec;
- evcount_attach(&sc->sc_intrcnt, self->dv_xname,
- (void *)&cvec, &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname, &cvec);
/*
* Allocate a (DMA-safe) block for all descriptors and buffers.
diff --git a/sys/arch/vax/vsa/if_ze_vsbus.c b/sys/arch/vax/vsa/if_ze_vsbus.c
index e2bb48319c3..9f0d537af55 100644
--- a/sys/arch/vax/vsa/if_ze_vsbus.c
+++ b/sys/arch/vax/vsa/if_ze_vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ze_vsbus.c,v 1.5 2008/08/22 17:09:08 deraadt Exp $ */
+/* $OpenBSD: if_ze_vsbus.c,v 1.6 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: if_ze_vsbus.c,v 1.5 2000/07/26 21:50:49 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -117,8 +117,7 @@ zeattach(parent, self, aux)
sc->sc_intvec = SGECVEC;
scb_vecalloc(va->va_cvec, (void (*)(void *)) sgec_intr,
sc, SCB_ISTACK, &sc->sc_intrcnt);
- evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
- (void *)&sc->sc_intvec, &evcount_intr);
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname, &sc->sc_intvec);
/*
* Map in, read and release ethernet rom address.
diff --git a/sys/arch/vax/vsa/ncr.c b/sys/arch/vax/vsa/ncr.c
index 1d237775e50..3be30b4692e 100644
--- a/sys/arch/vax/vsa/ncr.c
+++ b/sys/arch/vax/vsa/ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr.c,v 1.27 2010/06/28 18:31:01 krw Exp $ */
+/* $OpenBSD: ncr.c,v 1.28 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: ncr.c,v 1.32 2000/06/25 16:00:43 ragge Exp $ */
/*-
@@ -171,8 +171,7 @@ si_attach(parent, self, aux)
scb_vecalloc(va->va_cvec, (void (*)(void *)) ncr5380_intr, sc,
SCB_ISTACK, &sc->ncr_intrcnt);
sc->ncr_cvec = va->va_cvec;
- evcount_attach(&sc->ncr_intrcnt, self->dv_xname,
- (void *)&sc->ncr_cvec, &evcount_intr);
+ evcount_attach(&sc->ncr_intrcnt, self->dv_xname, &sc->ncr_cvec);
/*
* DMA area mapin.
diff --git a/sys/arch/vax/vxt/vxtbus.c b/sys/arch/vax/vxt/vxtbus.c
index cf60cac08d1..5f676693cd3 100644
--- a/sys/arch/vax/vxt/vxtbus.c
+++ b/sys/arch/vax/vxt/vxtbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vxtbus.c,v 1.2 2006/08/30 19:23:57 miod Exp $ */
+/* $OpenBSD: vxtbus.c,v 1.3 2010/09/20 06:33:48 matthew Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -118,7 +118,7 @@ vxtbus_intr_establish(const char *name, int ipl, int (*fn)(void *), void *arg)
ih->ih_fn = fn;
ih->ih_arg = arg;
ih->ih_vec = VXT_INTRVEC;
- evcount_attach(&ih->ih_cnt, name, (void *)&ih->ih_vec, &evcount_intr);
+ evcount_attach(&ih->ih_cnt, name, &ih->ih_vec);
LIST_INSERT_HEAD(&sc->sc_intrlist, ih, ih_link);
}
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 5b24b6ea56d..cb29b8211df 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.85 2010/09/08 17:56:16 deraadt Exp $ */
+/* $OpenBSD: pccbb.c,v 1.86 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */
/*
@@ -1534,8 +1534,7 @@ pccbb_intr_establish(struct pccbb_softc *sc, int irq, int level,
newpil->pil_func = func;
newpil->pil_arg = arg;
newpil->pil_level = level;
- evcount_attach(&newpil->pil_count, name, &sc->sc_intrline,
- &evcount_intr);
+ evcount_attach(&newpil->pil_count, name, &sc->sc_intrline);
newpil->pil_next = NULL;
if (sc->sc_pil == NULL) {
diff --git a/sys/dev/tc/tcds.c b/sys/dev/tc/tcds.c
index c217943bb4a..db78741ad6d 100644
--- a/sys/dev/tc/tcds.c
+++ b/sys/dev/tc/tcds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcds.c,v 1.7 2008/08/09 16:42:30 miod Exp $ */
+/* $OpenBSD: tcds.c,v 1.8 2010/09/20 06:33:48 matthew Exp $ */
/* $NetBSD: tcds.c,v 1.3 2001/11/13 06:26:10 lukem Exp $ */
/*-
@@ -348,7 +348,7 @@ tcds_intr_establish(tcds, slot, func, arg, name)
sc->sc_slots[slot].sc_intrhand = func;
sc->sc_slots[slot].sc_intrarg = arg;
- evcount_attach(&sc->sc_slots[slot].sc_count, name, NULL, &evcount_intr);
+ evcount_attach(&sc->sc_slots[slot].sc_count, name, NULL);
tcds_scsi_reset(&sc->sc_slots[slot]);
}
diff --git a/sys/kern/subr_evcount.c b/sys/kern/subr_evcount.c
index 1fb6a8f7494..51dbdd1c950 100644
--- a/sys/kern/subr_evcount.c
+++ b/sys/kern/subr_evcount.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_evcount.c,v 1.9 2010/04/20 22:05:43 tedu Exp $ */
+/* $OpenBSD: subr_evcount.c,v 1.10 2010/09/20 06:33:46 matthew Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
* Copyright (c) 2004 Aaron Campbell <aaron@openbsd.org>
@@ -33,39 +33,16 @@
#include <sys/proc.h>
#include <sys/sysctl.h>
-static TAILQ_HEAD(,evcount) evcount_list;
-
-/*
- * Standard evcount parents.
- */
-struct evcount evcount_intr;
-
-void evcount_init(void);
-
-void
-evcount_init(void)
-{
- TAILQ_INIT(&evcount_list);
-
- evcount_attach(&evcount_intr, "intr", NULL, NULL);
-}
-
+static TAILQ_HEAD(,evcount) evcount_list = TAILQ_HEAD_INITIALIZER(evcount_list);
void
-evcount_attach(struct evcount *ec, const char *name, void *data,
- struct evcount *parent)
+evcount_attach(struct evcount *ec, const char *name, void *data)
{
static int nextid = 0;
- if (nextid == 0) {
- nextid++; /* start with 1 */
- evcount_init();
- }
-
memset(ec, 0, sizeof(*ec));
ec->ec_name = name;
- ec->ec_parent = parent;
- ec->ec_id = nextid++;
+ ec->ec_id = ++nextid;
ec->ec_data = data;
TAILQ_INSERT_TAIL(&evcount_list, ec, next);
}
@@ -100,8 +77,6 @@ evcount_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
nintr = 0;
TAILQ_FOREACH(ec, &evcount_list, next) {
- if (ec->ec_parent != &evcount_intr)
- continue;
if (nintr++ == i)
break;
}
diff --git a/sys/sys/evcount.h b/sys/sys/evcount.h
index 6808bd78e94..9124e944b23 100644
--- a/sys/sys/evcount.h
+++ b/sys/sys/evcount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: evcount.h,v 1.2 2004/09/29 07:37:07 miod Exp $ */
+/* $OpenBSD: evcount.h,v 1.3 2010/09/20 06:33:46 matthew Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
* Copyright (c) 2004 Aaron Campbell <aaron@openbsd.org>
@@ -36,21 +36,15 @@ struct evcount {
u_int64_t ec_count; /* main counter */
int ec_id; /* counter ID */
const char *ec_name; /* counter name */
- struct evcount *ec_parent; /* parent */
void *ec_data; /* user data */
TAILQ_ENTRY(evcount) next;
};
-void evcount_attach(struct evcount *, const char *, void *, struct evcount *);
+void evcount_attach(struct evcount *, const char *, void *);
void evcount_detach(struct evcount *);
int evcount_sysctl(int *, u_int, void *, size_t *, void *, size_t);
-/*
- * Standard evcount parents.
- */
-extern struct evcount evcount_intr;
-
#endif /* _KERNEL */
#endif