summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-02 14:00:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-02 14:00:44 +0000
commit1c3cd801b4e596df43e6d0da9ae496a920dddaab (patch)
tree707d968273304cc8b9094ba0e5ead6256affb763 /sys
parent16f5556628dee2b11b2c7638e54a4328abc98d40 (diff)
Switch mvme88k to evcount, but keep maintaining intrcnt[] too for now.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/m88k/include/types.h12
-rw-r--r--sys/arch/mvme88k/dev/cl.c33
-rw-r--r--sys/arch/mvme88k/dev/clock.c23
-rw-r--r--sys/arch/mvme88k/dev/dart.c10
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c10
-rw-r--r--sys/arch/mvme88k/dev/if_le.c12
-rw-r--r--sys/arch/mvme88k/dev/if_levar.h5
-rw-r--r--sys/arch/mvme88k/dev/osiop_pcctwo.c11
-rw-r--r--sys/arch/mvme88k/dev/vs.c16
-rw-r--r--sys/arch/mvme88k/dev/vsvar.h6
-rw-r--r--sys/arch/mvme88k/dev/vx.c10
11 files changed, 101 insertions, 47 deletions
diff --git a/sys/arch/m88k/include/types.h b/sys/arch/m88k/include/types.h
index fd1ec2d7649..ca32e668798 100644
--- a/sys/arch/m88k/include/types.h
+++ b/sys/arch/m88k/include/types.h
@@ -1,5 +1,5 @@
/* $NetBSD: types.h,v 1.7 1995/07/05 17:46:11 pk Exp $ */
-/* $OpenBSD: types.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: types.h,v 1.2 2004/07/02 14:00:38 miod Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -41,12 +41,12 @@
* @(#)types.h 8.1 (Berkeley) 6/11/93
*/
-#ifndef _MACHTYPES_H_
-#define _MACHTYPES_H_
+#ifndef _M88K_TYPES_H_
+#define _M88K_TYPES_H_
#include <sys/cdefs.h>
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t {
int val[19];
} label_t;
@@ -77,4 +77,6 @@ typedef unsigned long long uint64_t;
typedef int32_t register_t;
-#endif /* _MACHTYPES_H_ */
+#define __HAVE_EVCOUNT
+
+#endif /* _M88K_TYPES_H_ */
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index 9e76df0dce2..428be1b605f 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.46 2004/07/02 11:19:58 miod Exp $ */
+/* $OpenBSD: cl.c,v 1.47 2004/07/02 14:00:42 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -35,6 +35,7 @@
#include <sys/time.h>
#include <sys/device.h>
#include <sys/syslog.h>
+#include <sys/evcount.h>
#include <machine/autoconf.h>
#include <machine/conf.h>
@@ -109,9 +110,12 @@ struct clsoftc {
struct device sc_dev;
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
- struct evcnt sc_txintrcnt;
- struct evcnt sc_rxintrcnt;
- struct evcnt sc_mxintrcnt;
+ struct evcount sc_txintrcnt;
+ char sc_txintrname[16 + 3];
+ struct evcount sc_rxintrcnt;
+ char sc_rxintrname[16 + 3];
+ struct evcount sc_mxintrcnt;
+ char sc_mxintrname[16 + 3];
time_t sc_fotime; /* time of last fifo overrun */
struct cl_info sc_cl[CLCD_PORTS_PER_CHIP];
struct intrhand sc_ih_e;
@@ -369,9 +373,18 @@ clattach(parent, self, aux)
bus_space_write_1(sc->sc_pcctwo->sc_iot, sc->sc_pcctwo->sc_ioh,
PCCTWO_SCCRX, PCC2_IRQ_IEN | (ca->ca_ipl & PCC2_IRQ_IPL));
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_txintrcnt);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_rxintrcnt);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_mxintrcnt);
+ snprintf(sc->sc_txintrname, sizeof sc->sc_txintrname,
+ "%s_tx", self->dv_xname);
+ evcount_attach(&sc->sc_txintrcnt, sc->sc_txintrname,
+ (void *)&sc->sc_ih_t.ih_ipl, &evcount_intr);
+ snprintf(sc->sc_rxintrname, sizeof sc->sc_rxintrname,
+ "%s_rx", self->dv_xname);
+ evcount_attach(&sc->sc_rxintrcnt, sc->sc_rxintrname,
+ (void *)&sc->sc_ih_r.ih_ipl, &evcount_intr);
+ snprintf(sc->sc_mxintrname, sizeof sc->sc_mxintrname,
+ "%s_mx", self->dv_xname);
+ evcount_attach(&sc->sc_mxintrcnt, sc->sc_mxintrname,
+ (void *)&sc->sc_ih_m.ih_ipl, &evcount_intr);
printf("\n");
}
@@ -1302,7 +1315,7 @@ cl_mintr(arg)
log(LOG_WARNING, "cl_mintr extra intr\n");
return 0;
}
- sc->sc_mxintrcnt.ev_count++;
+ sc->sc_mxintrcnt.ec_count++;
channel = mir & 0x03;
misr = bus_space_read_1(iot, ioh, CL_MISR);
@@ -1365,7 +1378,7 @@ cl_txintr(arg)
log(LOG_WARNING, "cl_txintr extra intr\n");
return 0;
}
- sc->sc_txintrcnt.ev_count++;
+ sc->sc_txintrcnt.ec_count++;
channel = tir & 0x03;
sc->sc_cl[channel].txcnt ++;
@@ -1500,7 +1513,7 @@ cl_rxintr(arg)
log(LOG_WARNING, "cl_rxintr extra intr\n");
return 0;
}
- sc->sc_rxintrcnt.ev_count++;
+ sc->sc_rxintrcnt.ec_count++;
channel = rir & 0x3;
cmr = bus_space_read_1(iot, ioh, CL_CMR);
diff --git a/sys/arch/mvme88k/dev/clock.c b/sys/arch/mvme88k/dev/clock.c
index 0cb3f3fdf07..0cf6d10a38c 100644
--- a/sys/arch/mvme88k/dev/clock.c
+++ b/sys/arch/mvme88k/dev/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.30 2004/04/24 19:51:47 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.31 2004/07/02 14:00:42 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1995 Theo de Raadt
@@ -75,6 +75,7 @@
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/systm.h>
+#include <sys/evcount.h>
#include <machine/asm.h>
#include <machine/board.h> /* for register defines */
@@ -117,7 +118,9 @@ void write_cio(int, u_int8_t);
struct clocksoftc {
struct device sc_dev;
struct intrhand sc_profih;
+ struct evcount sc_profcnt;
struct intrhand sc_statih;
+ struct evcount sc_statcnt;
};
struct cfattach clock_ca = {
@@ -219,6 +222,11 @@ clockattach(struct device *parent, struct device *self, void *args)
break;
#endif /* NSYSCON */
}
+
+ evcount_attach(&sc->sc_statcnt, "stat", (void *)&sc->sc_statih.ih_ipl,
+ &evcount_intr);
+ evcount_attach(&sc->sc_profcnt, "clock", (void *)&sc->sc_profih.ih_ipl,
+ &evcount_intr);
printf("\n");
}
@@ -254,10 +262,14 @@ sbc_initclock(void)
int
sbc_clockintr(void *eframe)
{
+ struct clocksoftc *sc = clock_cd.cd_devs[0];
+
*(volatile u_int8_t *)(OBIO_START + PCC2_BASE + PCCTWO_T1ICR) =
prof_reset;
intrcnt[M88K_CLK_IRQ]++;
+ sc->sc_profcnt.ec_count++;
+
hardclock(eframe);
#if NBUGTTY > 0
bugtty_chkinput();
@@ -303,13 +315,14 @@ sbc_initstatclock(void)
int
sbc_statintr(void *eframe)
{
+ struct clocksoftc *sc = clock_cd.cd_devs[0];
u_long newint, r, var;
*(volatile u_int8_t *)(OBIO_START + PCC2_BASE + PCCTWO_T2ICR) =
stat_reset;
- /* increment intr counter */
intrcnt[M88K_SCLK_IRQ]++;
+ sc->sc_statcnt.ec_count++;
statclock((struct clockframe *)eframe);
@@ -341,6 +354,7 @@ sbc_statintr(void *eframe)
int
m188_clockintr(void *eframe)
{
+ struct clocksoftc *sc = clock_cd.cd_devs[0];
volatile int tmp;
/* acknowledge the timer interrupt */
@@ -350,6 +364,8 @@ m188_clockintr(void *eframe)
tmp = *(int *volatile)DART_STOPC;
intrcnt[M88K_CLK_IRQ]++;
+ sc->sc_profcnt.ec_count++;
+
hardclock(eframe);
#if NBUGTTY > 0
bugtty_chkinput();
@@ -422,12 +438,13 @@ m188_timer_init(unsigned period)
int
m188_statintr(void *eframe)
{
+ struct clocksoftc *sc = clock_cd.cd_devs[0];
u_long newint, r, var;
CIO_LOCK;
- /* increment intr counter */
intrcnt[M88K_SCLK_IRQ]++;
+ sc->sc_statcnt.ec_count++;
statclock((struct clockframe *)eframe);
write_cio(CIO_CSR1, CIO_GCB | CIO_CIP); /* Ack the interrupt */
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c
index a613a5a10b6..8175665d6e4 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.33 2004/04/24 19:51:47 miod Exp $ */
+/* $OpenBSD: dart.c,v 1.34 2004/07/02 14:00:43 miod Exp $ */
/*
* Mach Operating System
@@ -36,6 +36,7 @@
#include <sys/device.h>
#include <sys/simplelock.h>
#include <sys/syslog.h>
+#include <sys/evcount.h>
#include <machine/asm_macro.h> /* enable/disable interrupts */
#include <machine/autoconf.h>
@@ -73,7 +74,7 @@ struct dart_info {
struct dartsoftc {
struct device sc_dev;
- struct evcnt sc_intrcnt;
+ struct evcount sc_intrcnt;
union dartreg *dart_reg;
union dart_pt_io *port_reg[NDARTPORTS];
struct dart_info sc_dart[NDARTPORTS];
@@ -307,7 +308,8 @@ dartattach(parent, self, aux)
sc->sc_ih.ih_ipl = ca->ca_ipl;
sysconintr_establish(SYSCV_SCC, &sc->sc_ih);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname,
+ (void *)&sc->sc_ih.ih_ipl, &evcount_intr);
printf("\n");
}
@@ -1098,6 +1100,8 @@ dartintr(arg)
isr &= dart_sv_reg.sv_imr;
if (isr) { /* interrupt from this duart */
+ sc->sc_intrcnt.ec_count++;
+
if (isr & IIPCHG) {
unsigned int ip = addr->read.rd_ip;
unsigned int ipcr = addr->read.rd_ipcr;
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index a9c3791b2ef..9478f6516dc 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.28 2004/04/24 19:51:48 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.29 2004/07/02 14:00:43 miod Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -105,6 +105,7 @@ Mode of operation:
#include <sys/errno.h>
#include <sys/syslog.h>
#include <sys/device.h>
+#include <sys/evcount.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -163,7 +164,7 @@ struct vm_map *ie_map; /* for obio */
struct ie_softc {
struct device sc_dev; /* device structure */
struct intrhand sc_ih, sc_failih; /* interrupt info */
- struct evcnt sc_intrcnt; /* # of interrupts, per ie */
+ struct evcount sc_intrcnt; /* # of interrupts, per ie */
caddr_t sc_iobase; /* KVA of base of 24 bit addr space */
caddr_t sc_maddr; /* KVA of base of chip's RAM (16bit addr sp.)*/
@@ -494,7 +495,8 @@ ieattach(parent, self, aux)
PCCTWO_IEBERR, PCC2_IRQ_IEN | PCC2_IRQ_ICLR |
(ca->ca_ipl & PCC2_IRQ_IPL));
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname,
+ (void *)&sc->sc_ih.ih_ipl, &evcount_intr);
}
/*
@@ -596,7 +598,7 @@ loop:
if ((status = sc->scb->ie_status) & IE_ST_WHENCE)
goto loop;
- sc->sc_intrcnt.ev_count++;
+ sc->sc_intrcnt.ec_count++;
return 1;
}
diff --git a/sys/arch/mvme88k/dev/if_le.c b/sys/arch/mvme88k/dev/if_le.c
index 4b1a26e96ea..c1275d9b0f7 100644
--- a/sys/arch/mvme88k/dev/if_le.c
+++ b/sys/arch/mvme88k/dev/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.8 2004/07/02 11:19:58 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.9 2004/07/02 14:00:43 miod Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
@@ -41,6 +41,7 @@
#include <sys/socket.h>
#include <sys/device.h>
#include <sys/malloc.h>
+#include <sys/evcount.h>
#include <net/if.h>
@@ -205,9 +206,11 @@ int
vle_intr(sc)
void *sc;
{
- struct vlereg1 *reg1 = (struct vlereg1 *)((struct le_softc *)sc)->sc_r1;
+ struct le_softc *lesc = (struct le_softc *)sc;
+ struct vlereg1 *reg1 = (struct vlereg1 *)lesc->sc_r1;
int rc;
+ lesc->sc_intrcnt.ec_count++;
rc = am7990_intr(sc);
ENABLE_INTR;
return (rc);
@@ -356,9 +359,6 @@ leattach(parent, self, aux)
/* get Ethernet address */
vleetheraddr(sc);
- evcnt_attach(&sc->sc_dev, "intr", &lesc->sc_intrcnt);
- evcnt_attach(&sc->sc_dev, "errs", &lesc->sc_errcnt);
-
am7990_config(sc);
/* connect the interrupt */
@@ -367,4 +367,6 @@ leattach(parent, self, aux)
lesc->sc_ih.ih_wantframe = 0;
lesc->sc_ih.ih_ipl = ca->ca_ipl;
vmeintr_establish(ca->ca_vec, &lesc->sc_ih);
+ evcount_attach(&lesc->sc_intrcnt, self->dv_xname,
+ (void *)&lesc->sc_ih.ih_ipl, &evcount_intr);
}
diff --git a/sys/arch/mvme88k/dev/if_levar.h b/sys/arch/mvme88k/dev/if_levar.h
index 3bea779c1ce..bb2da7dc373 100644
--- a/sys/arch/mvme88k/dev/if_levar.h
+++ b/sys/arch/mvme88k/dev/if_levar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_levar.h,v 1.2 2004/05/17 08:36:22 miod Exp $ */
+/* $OpenBSD: if_levar.h,v 1.3 2004/07/02 14:00:43 miod Exp $ */
/* $NetBSD: if_levar.h,v 1.5 1996/05/07 01:27:32 thorpej Exp $ */
/*-
@@ -47,8 +47,7 @@ struct le_softc {
struct intrhand sc_ih; /* interrupt vectoring */
u_int16_t sc_csr; /* CSR image */
void *sc_r1; /* LANCE registers */
- struct evcnt sc_intrcnt;
- struct evcnt sc_errcnt;
+ struct evcount sc_intrcnt;
u_char sc_ipl;
u_char sc_vec;
};
diff --git a/sys/arch/mvme88k/dev/osiop_pcctwo.c b/sys/arch/mvme88k/dev/osiop_pcctwo.c
index c609d8e46f0..8d2eabc4be4 100644
--- a/sys/arch/mvme88k/dev/osiop_pcctwo.c
+++ b/sys/arch/mvme88k/dev/osiop_pcctwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop_pcctwo.c,v 1.1 2004/05/07 18:12:58 miod Exp $ */
+/* $OpenBSD: osiop_pcctwo.c,v 1.2 2004/07/02 14:00:43 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -29,6 +29,7 @@
#include <sys/device.h>
#include <sys/disklabel.h>
#include <sys/dkstat.h>
+#include <sys/evcount.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
@@ -53,7 +54,7 @@ int osiop_pcctwo_match(struct device *, void *, void *);
struct osiop_pcctwo_softc {
struct osiop_softc sc_osiop;
struct intrhand sc_ih;
- struct evcnt sc_intrcnt;
+ struct evcount sc_intrcnt;
};
struct cfattach osiop_pcctwo_ca = {
@@ -163,12 +164,14 @@ osiop_pcctwo_attach(struct device *parent, struct device *self, void *aux)
bus_space_write_1(pcctwo->sc_iot, pcctwo->sc_ioh,
PCCTWO_SCSIICR, PCC2_IRQ_IEN | (ca->ca_ipl & PCC2_IRQ_IPL));
- evcnt_attach(self, "intr", &psc->sc_intrcnt);
+ evcount_attach(&psc->sc_intrcnt, self->dv_xname,
+ (void *)&psc->sc_ih.ih_ipl, &evcount_intr);
}
int
osiop_pcctwo_intr(void *arg)
{
+ struct osiop_pcctwo_softc *psc = arg;
struct osiop_softc *sc = arg;
u_int8_t istat;
@@ -179,6 +182,8 @@ osiop_pcctwo_intr(void *arg)
if ((istat & (OSIOP_ISTAT_SIP | OSIOP_ISTAT_DIP)) == 0)
return 0;
+ psc->sc_intrcnt.ec_count++;
+
/*
* 53c710 manual recommends reading dstat and sstat0 at least
* 12 clk cycles apart if reading as bytes (which is what
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index e65c7ad9ce7..4163b419a6c 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.41 2004/06/10 16:05:22 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.42 2004/07/02 14:00:43 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
@@ -48,6 +48,7 @@
#include <sys/dkstat.h>
#include <sys/buf.h>
#include <sys/malloc.h>
+#include <sys/evcount.h>
#include <uvm/uvm.h>
@@ -183,8 +184,13 @@ vsattach(struct device *parent, struct device *self, void *args)
vmeintr_establish(sc->sc_nvec, &sc->sc_ih_n);
vmeintr_establish(sc->sc_evec, &sc->sc_ih_e);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt_n);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt_e);
+
+ evcount_attach(&sc->sc_intrcnt_n, self->dv_xname,
+ (void *)&sc->sc_ih_n.ih_ipl, &evcount_intr);
+ snprintf(sc->sc_intrname_e, sizeof sc->sc_intrname_e,
+ "%s_err", self->dv_xname);
+ evcount_attach(&sc->sc_intrcnt_e, sc->sc_intrname_e,
+ (void *)&sc->sc_ih_e.ih_ipl, &evcount_intr);
/*
* attach all scsi units on us, watching for boot device
@@ -697,7 +703,7 @@ vs_nintr(void *vsc)
/* Got a valid interrupt on this device */
s = splbio();
- sc->sc_intrcnt_n.ev_count++;
+ sc->sc_intrcnt_n.ec_count++;
m328_cmd = (void *)crb_read(4, CRB_CTAG);
/*
@@ -742,7 +748,7 @@ vs_eintr(void *vsc)
/* Got a valid interrupt on this device */
s = splbio();
- sc->sc_intrcnt_e.ev_count++;
+ sc->sc_intrcnt_e.ec_count++;
crsw = vs_read(2, sh_CEVSB + CEVSB_CRSW);
ecode = vs_read(1, sh_CEVSB + CEVSB_ERROR);
diff --git a/sys/arch/mvme88k/dev/vsvar.h b/sys/arch/mvme88k/dev/vsvar.h
index e83d20f11cc..27b9ac7ce79 100644
--- a/sys/arch/mvme88k/dev/vsvar.h
+++ b/sys/arch/mvme88k/dev/vsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsvar.h,v 1.13 2004/05/22 21:02:38 miod Exp $ */
+/* $OpenBSD: vsvar.h,v 1.14 2004/07/02 14:00:43 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -95,7 +95,9 @@ struct vs_softc {
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
struct intrhand sc_ih_e, sc_ih_n;
- struct evcnt sc_intrcnt_e, sc_intrcnt_n;
+ struct evcount sc_intrcnt_e;
+ struct evcount sc_intrcnt_n;
+ char sc_intrname_e[16 + 4];
int sc_ipl;
int sc_evec, sc_nvec;
int sc_pid, sc_sid;
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index fb1ed22d524..069cd8f8b96 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.34 2004/07/02 11:19:43 miod Exp $ */
+/* $OpenBSD: vx.c,v 1.35 2004/07/02 14:00:43 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -38,6 +38,7 @@
#include <sys/time.h>
#include <sys/device.h>
#include <sys/syslog.h>
+#include <sys/evcount.h>
#include <machine/autoconf.h>
#include <machine/conf.h>
@@ -65,7 +66,7 @@ struct vx_info {
struct vxsoftc {
struct device sc_dev;
- struct evcnt sc_intrcnt;
+ struct evcount sc_intrcnt;
struct vx_info sc_info[NVXPORTS];
struct vxreg *vx_reg;
vaddr_t board_vaddr;
@@ -227,7 +228,8 @@ vxattach(struct device *parent, struct device *self, void *aux)
sc->sc_ih.ih_ipl = IPL_TTY;
vmeintr_establish(ca->ca_vec, &sc->sc_ih);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname,
+ (void *)&sc->sc_ih.ih_ipl, &evcount_intr);
}
short
@@ -973,7 +975,7 @@ vx_intr(void *arg)
short cmd;
u_char port;
- sc->sc_intrcnt.ev_count++;
+ sc->sc_intrcnt.ec_count++;
while (env_isvalid(get_status_head(sc))) {
pktp = get_packet(sc, get_status_head(sc));