summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme88k/dev')
-rw-r--r--sys/arch/mvme88k/dev/bussw.c12
-rw-r--r--sys/arch/mvme88k/dev/cl.c47
-rw-r--r--sys/arch/mvme88k/dev/clock.c26
-rw-r--r--sys/arch/mvme88k/dev/dart.c10
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c15
-rw-r--r--sys/arch/mvme88k/dev/if_le.c8
-rw-r--r--sys/arch/mvme88k/dev/if_levar.h3
-rw-r--r--sys/arch/mvme88k/dev/memc.c4
-rw-r--r--sys/arch/mvme88k/dev/osiop_pcctwo.c12
-rw-r--r--sys/arch/mvme88k/dev/pcctwo.c8
-rw-r--r--sys/arch/mvme88k/dev/pcctwovar.h4
-rw-r--r--sys/arch/mvme88k/dev/syscon.c16
-rw-r--r--sys/arch/mvme88k/dev/sysconreg.h4
-rw-r--r--sys/arch/mvme88k/dev/vme.c10
-rw-r--r--sys/arch/mvme88k/dev/vme.h4
-rw-r--r--sys/arch/mvme88k/dev/vs.c14
-rw-r--r--sys/arch/mvme88k/dev/vsvar.h4
-rw-r--r--sys/arch/mvme88k/dev/vx.c10
18 files changed, 70 insertions, 141 deletions
diff --git a/sys/arch/mvme88k/dev/bussw.c b/sys/arch/mvme88k/dev/bussw.c
index a466f296a24..67adc2d4667 100644
--- a/sys/arch/mvme88k/dev/bussw.c
+++ b/sys/arch/mvme88k/dev/bussw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bussw.c,v 1.14 2004/05/07 18:10:28 miod Exp $ */
+/* $OpenBSD: bussw.c,v 1.15 2004/07/30 19:02:05 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
*
@@ -60,7 +60,7 @@ struct cfdriver bussw_cd = {
int bussw_print(void *, const char *);
int bussw_scan(struct device *, void *, void *);
int busswabort(void *);
-int busswintr_establish(int, struct intrhand *);
+int busswintr_establish(int, struct intrhand *, const char *);
int
bussw_match(parent, vcf, args)
@@ -123,7 +123,7 @@ bussw_attach(parent, self, args)
sc->sc_abih.ih_wantframe = 1;
sc->sc_abih.ih_ipl = IPL_NMI;
- busswintr_establish(BS_ABORTIRQ, &sc->sc_abih);
+ busswintr_establish(BS_ABORTIRQ, &sc->sc_abih, "abort");
bus_space_write_1(sc->sc_iot, ioh, BS_ABORT,
bus_space_read_4(sc->sc_iot, ioh, BS_ABORT) | BS_ABORT_IEN);
@@ -174,16 +174,14 @@ bussw_scan(parent, child, args)
}
int
-busswintr_establish(vec, ih)
- int vec;
- struct intrhand *ih;
+busswintr_establish(int vec, struct intrhand *ih, const char *name)
{
#ifdef DIAGNOSTIC
if (vec < 0 || vec >= BS_NVEC)
panic("busswintr_establish: illegal vector 0x%x\n", vec);
#endif
- return (intr_establish(BS_VECBASE + vec, ih));
+ return intr_establish(BS_VECBASE + vec, ih, name);
}
int
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index 428be1b605f..9788d57cab8 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.47 2004/07/02 14:00:42 miod Exp $ */
+/* $OpenBSD: cl.c,v 1.48 2004/07/30 19:02:05 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -35,7 +35,6 @@
#include <sys/time.h>
#include <sys/device.h>
#include <sys/syslog.h>
-#include <sys/evcount.h>
#include <machine/autoconf.h>
#include <machine/conf.h>
@@ -110,18 +109,16 @@ struct clsoftc {
struct device sc_dev;
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
- 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;
struct intrhand sc_ih_m;
struct intrhand sc_ih_t;
struct intrhand sc_ih_r;
+ char sc_errintrname[16 + 4];
+ char sc_mxintrname[16 + 3];
+ char sc_rxintrname[16 + 3];
+ char sc_txintrname[16 + 3];
struct pcctwosoftc *sc_pcctwo;
};
@@ -361,10 +358,19 @@ clattach(parent, self, aux)
sc->sc_ih_r.ih_wantframe = 0;
sc->sc_ih_r.ih_ipl = ca->ca_ipl;
- pcctwointr_establish(PCC2V_SCC_RXE, &sc->sc_ih_e);
- pcctwointr_establish(PCC2V_SCC_M, &sc->sc_ih_m);
- pcctwointr_establish(PCC2V_SCC_TX, &sc->sc_ih_t);
- pcctwointr_establish(PCC2V_SCC_RX, &sc->sc_ih_r);
+ snprintf(sc->sc_errintrname, sizeof sc->sc_errintrname,
+ "%s_err", self->dv_xname);
+ snprintf(sc->sc_mxintrname, sizeof sc->sc_mxintrname,
+ "%s_mx", self->dv_xname);
+ snprintf(sc->sc_rxintrname, sizeof sc->sc_rxintrname,
+ "%s_rx", self->dv_xname);
+ snprintf(sc->sc_txintrname, sizeof sc->sc_txintrname,
+ "%s_tx", self->dv_xname);
+
+ pcctwointr_establish(PCC2V_SCC_RXE, &sc->sc_ih_e, sc->sc_errintrname);
+ pcctwointr_establish(PCC2V_SCC_M, &sc->sc_ih_m, sc->sc_mxintrname);
+ pcctwointr_establish(PCC2V_SCC_TX, &sc->sc_ih_t, sc->sc_txintrname);
+ pcctwointr_establish(PCC2V_SCC_RX, &sc->sc_ih_r, sc->sc_rxintrname);
bus_space_write_1(sc->sc_pcctwo->sc_iot, sc->sc_pcctwo->sc_ioh,
PCCTWO_SCCICR, PCC2_IRQ_IEN | (ca->ca_ipl & PCC2_IRQ_IPL));
@@ -373,19 +379,6 @@ 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));
- 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");
}
@@ -1315,7 +1308,6 @@ cl_mintr(arg)
log(LOG_WARNING, "cl_mintr extra intr\n");
return 0;
}
- sc->sc_mxintrcnt.ec_count++;
channel = mir & 0x03;
misr = bus_space_read_1(iot, ioh, CL_MISR);
@@ -1378,7 +1370,6 @@ cl_txintr(arg)
log(LOG_WARNING, "cl_txintr extra intr\n");
return 0;
}
- sc->sc_txintrcnt.ec_count++;
channel = tir & 0x03;
sc->sc_cl[channel].txcnt ++;
@@ -1513,7 +1504,7 @@ cl_rxintr(arg)
log(LOG_WARNING, "cl_rxintr extra intr\n");
return 0;
}
- 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 cb2e4061e38..b193c5ad6f0 100644
--- a/sys/arch/mvme88k/dev/clock.c
+++ b/sys/arch/mvme88k/dev/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.32 2004/07/23 21:00:09 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.33 2004/07/30 19:02:05 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1995 Theo de Raadt
@@ -75,7 +75,6 @@
#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 */
@@ -118,9 +117,7 @@ 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 = {
@@ -194,14 +191,14 @@ clockattach(struct device *parent, struct device *self, void *args)
sc->sc_profih.ih_wantframe = 1;
sc->sc_profih.ih_ipl = ca->ca_ipl;
prof_reset = ca->ca_ipl | PCC2_IRQ_IEN | PCC2_IRQ_ICLR;
- pcctwointr_establish(PCC2V_TIMER1, &sc->sc_profih);
+ pcctwointr_establish(PCC2V_TIMER1, &sc->sc_profih, "clock");
md.clock_init_func = sbc_initclock;
sc->sc_statih.ih_fn = sbc_statintr;
sc->sc_statih.ih_arg = 0;
sc->sc_statih.ih_wantframe = 1;
sc->sc_statih.ih_ipl = ca->ca_ipl;
stat_reset = ca->ca_ipl | PCC2_IRQ_IEN | PCC2_IRQ_ICLR;
- pcctwointr_establish(PCC2V_TIMER2, &sc->sc_statih);
+ pcctwointr_establish(PCC2V_TIMER2, &sc->sc_statih, "stat");
md.statclock_init_func = sbc_initstatclock;
break;
#endif /* NPCCTWO */
@@ -211,22 +208,18 @@ clockattach(struct device *parent, struct device *self, void *args)
sc->sc_profih.ih_arg = 0;
sc->sc_profih.ih_wantframe = 1;
sc->sc_profih.ih_ipl = ca->ca_ipl;
- sysconintr_establish(SYSCV_TIMER1, &sc->sc_profih);
+ sysconintr_establish(SYSCV_TIMER1, &sc->sc_profih, "clock");
md.clock_init_func = m188_initclock;
sc->sc_statih.ih_fn = m188_statintr;
sc->sc_statih.ih_arg = 0;
sc->sc_statih.ih_wantframe = 1;
sc->sc_statih.ih_ipl = ca->ca_ipl;
- sysconintr_establish(SYSCV_TIMER2, &sc->sc_statih);
+ sysconintr_establish(SYSCV_TIMER2, &sc->sc_statih, "stat");
md.statclock_init_func = m188_initstatclock;
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");
}
@@ -262,13 +255,10 @@ 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
@@ -315,14 +305,12 @@ 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;
intrcnt[M88K_SCLK_IRQ]++;
- sc->sc_statcnt.ec_count++;
statclock((struct clockframe *)eframe);
@@ -354,7 +342,6 @@ sbc_statintr(void *eframe)
int
m188_clockintr(void *eframe)
{
- struct clocksoftc *sc = clock_cd.cd_devs[0];
volatile int tmp;
/* acknowledge the timer interrupt */
@@ -364,7 +351,6 @@ m188_clockintr(void *eframe)
tmp = *(int *volatile)DART_STOPC;
intrcnt[M88K_CLK_IRQ]++;
- sc->sc_profcnt.ec_count++;
hardclock(eframe);
#if NBUGTTY > 0
@@ -438,13 +424,11 @@ 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;
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 1a72ec183c9..48e28be4448 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.36 2004/07/23 23:15:49 miod Exp $ */
+/* $OpenBSD: dart.c,v 1.37 2004/07/30 19:02:05 miod Exp $ */
/*
* Mach Operating System
@@ -36,7 +36,6 @@
#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>
@@ -74,7 +73,6 @@ struct dart_info {
struct dartsoftc {
struct device sc_dev;
- struct evcount sc_intrcnt;
union dartreg *dart_reg;
union dart_pt_io *port_reg[NDARTPORTS];
struct dart_info sc_dart[NDARTPORTS];
@@ -307,9 +305,7 @@ dartattach(parent, self, aux)
sc->sc_ih.ih_wantframe = 0;
sc->sc_ih.ih_ipl = ca->ca_ipl;
- sysconintr_establish(SYSCV_SCC, &sc->sc_ih);
- evcount_attach(&sc->sc_intrcnt, self->dv_xname,
- (void *)&sc->sc_ih.ih_ipl, &evcount_intr);
+ sysconintr_establish(SYSCV_SCC, &sc->sc_ih, self->dv_xname);
printf("\n");
}
@@ -1103,8 +1099,6 @@ dartintr(arg)
if (isr == 0) /* not interrupt from this duart */
return 0;
- 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 9478f6516dc..e93398a3a83 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.29 2004/07/02 14:00:43 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.30 2004/07/30 19:02:05 miod Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -105,7 +105,6 @@ 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>
@@ -164,7 +163,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 evcount sc_intrcnt; /* # of interrupts, per ie */
+ char sc_failintrname[16 + 4];
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.)*/
@@ -484,8 +483,10 @@ ieattach(parent, self, aux)
sc->sc_failih.ih_wantframe = 0;
sc->sc_failih.ih_ipl = ca->ca_ipl;
- pcctwointr_establish(PCC2V_IE, &sc->sc_ih);
- pcctwointr_establish(PCC2V_IEFAIL, &sc->sc_failih);
+ pcctwointr_establish(PCC2V_IE, &sc->sc_ih, self->dv_xname);
+ snprintf(sc->sc_failintrname, sizeof sc->sc_failintrname, "%s_err",
+ self->dv_xname);
+ pcctwointr_establish(PCC2V_IEFAIL, &sc->sc_failih, sc->sc_failintrname);
/* enable device interrupts */
bus_space_write_1(sc->sc_pcctwo->sc_iot, sc->sc_pcctwo->sc_ioh,
@@ -494,9 +495,6 @@ ieattach(parent, self, aux)
bus_space_write_1(sc->sc_pcctwo->sc_iot, sc->sc_pcctwo->sc_ioh,
PCCTWO_IEBERR, PCC2_IRQ_IEN | PCC2_IRQ_ICLR |
(ca->ca_ipl & PCC2_IRQ_IPL));
-
- evcount_attach(&sc->sc_intrcnt, self->dv_xname,
- (void *)&sc->sc_ih.ih_ipl, &evcount_intr);
}
/*
@@ -598,7 +596,6 @@ loop:
if ((status = sc->scb->ie_status) & IE_ST_WHENCE)
goto loop;
- 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 c1275d9b0f7..50fd152a751 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.9 2004/07/02 14:00:43 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.10 2004/07/30 19:02:05 miod Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
@@ -41,7 +41,6 @@
#include <sys/socket.h>
#include <sys/device.h>
#include <sys/malloc.h>
-#include <sys/evcount.h>
#include <net/if.h>
@@ -210,7 +209,6 @@ vle_intr(sc)
struct vlereg1 *reg1 = (struct vlereg1 *)lesc->sc_r1;
int rc;
- lesc->sc_intrcnt.ec_count++;
rc = am7990_intr(sc);
ENABLE_INTR;
return (rc);
@@ -366,7 +364,5 @@ leattach(parent, self, aux)
lesc->sc_ih.ih_arg = sc;
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);
+ vmeintr_establish(ca->ca_vec, &lesc->sc_ih, self->dv_xname);
}
diff --git a/sys/arch/mvme88k/dev/if_levar.h b/sys/arch/mvme88k/dev/if_levar.h
index bb2da7dc373..534709fb992 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.3 2004/07/02 14:00:43 miod Exp $ */
+/* $OpenBSD: if_levar.h,v 1.4 2004/07/30 19:02:05 miod Exp $ */
/* $NetBSD: if_levar.h,v 1.5 1996/05/07 01:27:32 thorpej Exp $ */
/*-
@@ -47,7 +47,6 @@ struct le_softc {
struct intrhand sc_ih; /* interrupt vectoring */
u_int16_t sc_csr; /* CSR image */
void *sc_r1; /* LANCE registers */
- struct evcount sc_intrcnt;
u_char sc_ipl;
u_char sc_vec;
};
diff --git a/sys/arch/mvme88k/dev/memc.c b/sys/arch/mvme88k/dev/memc.c
index 822585dbfa6..ec762b816a3 100644
--- a/sys/arch/mvme88k/dev/memc.c
+++ b/sys/arch/mvme88k/dev/memc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memc.c,v 1.10 2004/04/24 19:51:48 miod Exp $ */
+/* $OpenBSD: memc.c,v 1.11 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -105,7 +105,7 @@ memcattach(parent, self, args)
sc->sc_ih.ih_arg = 0;
sc->sc_ih.ih_wantframe = 1;
sc->sc_ih.ih_ipl = 7;
- mcintr_establish(xxx, &sc->sc_ih);
+ mcintr_establish(xxx, &sc->sc_ih, self->dv_xname);
#endif
switch (sc->sc_memc->memc_chipid) {
diff --git a/sys/arch/mvme88k/dev/osiop_pcctwo.c b/sys/arch/mvme88k/dev/osiop_pcctwo.c
index 8d2eabc4be4..518a5dd24ff 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.2 2004/07/02 14:00:43 miod Exp $ */
+/* $OpenBSD: osiop_pcctwo.c,v 1.3 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -29,7 +29,6 @@
#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>
@@ -54,7 +53,6 @@ int osiop_pcctwo_match(struct device *, void *, void *);
struct osiop_pcctwo_softc {
struct osiop_softc sc_osiop;
struct intrhand sc_ih;
- struct evcount sc_intrcnt;
};
struct cfattach osiop_pcctwo_ca = {
@@ -160,18 +158,14 @@ osiop_pcctwo_attach(struct device *parent, struct device *self, void *aux)
psc->sc_ih.ih_ipl = ca->ca_ipl;
/* enable device interrupts */
- pcctwointr_establish(PCC2V_SCSI, &psc->sc_ih);
+ pcctwointr_establish(PCC2V_SCSI, &psc->sc_ih, self->dv_xname);
bus_space_write_1(pcctwo->sc_iot, pcctwo->sc_ioh,
PCCTWO_SCSIICR, PCC2_IRQ_IEN | (ca->ca_ipl & PCC2_IRQ_IPL));
-
- 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;
@@ -182,8 +176,6 @@ 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/pcctwo.c b/sys/arch/mvme88k/dev/pcctwo.c
index 5dd819704ec..1666c8e2009 100644
--- a/sys/arch/mvme88k/dev/pcctwo.c
+++ b/sys/arch/mvme88k/dev/pcctwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcctwo.c,v 1.25 2004/05/07 18:10:28 miod Exp $ */
+/* $OpenBSD: pcctwo.c,v 1.26 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
* All rights reserved.
@@ -184,14 +184,12 @@ pcctwo_scan(parent, child, args)
* PCC2 interrupts land in a PCC2_NVEC sized hole starting at PCC2_VECBASE
*/
int
-pcctwointr_establish(vec, ih)
- int vec;
- struct intrhand *ih;
+pcctwointr_establish(int vec, struct intrhand *ih, const char *name)
{
#ifdef DIAGNOSTIC
if (vec < 0 || vec >= PCC2_NVEC)
panic("pcctwo_establish: illegal vector 0x%x\n", vec);
#endif
- return (intr_establish(PCC2_VECBASE + vec, ih));
+ return intr_establish(PCC2_VECBASE + vec, ih, name);
}
diff --git a/sys/arch/mvme88k/dev/pcctwovar.h b/sys/arch/mvme88k/dev/pcctwovar.h
index 7e4f57fcf7d..70e4a38f17e 100644
--- a/sys/arch/mvme88k/dev/pcctwovar.h
+++ b/sys/arch/mvme88k/dev/pcctwovar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcctwovar.h,v 1.1 2004/04/24 19:51:48 miod Exp $ */
+/* $OpenBSD: pcctwovar.h,v 1.2 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -36,6 +36,6 @@ struct pcctwosoftc {
bus_space_handle_t sc_ioh;
};
-int pcctwointr_establish(int vec, struct intrhand *ih);
+int pcctwointr_establish(int, struct intrhand *, const char *);
#endif /* _MVME88K_PCCTWOVAR_H_ */
diff --git a/sys/arch/mvme88k/dev/syscon.c b/sys/arch/mvme88k/dev/syscon.c
index 739c4f1bb55..2864afe0466 100644
--- a/sys/arch/mvme88k/dev/syscon.c
+++ b/sys/arch/mvme88k/dev/syscon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscon.c,v 1.20 2004/05/07 18:10:28 miod Exp $ */
+/* $OpenBSD: syscon.c,v 1.21 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -152,25 +152,23 @@ sysconattach(parent, self, args)
sc->sc_m188ih.ih_wantframe = 1;
sc->sc_m188ih.ih_ipl = IPL_ABORT;
- sysconintr_establish(SYSCV_ABRT, &sc->sc_abih);
- sysconintr_establish(SYSCV_ACF, &sc->sc_acih);
- sysconintr_establish(SYSCV_SYSF, &sc->sc_sfih);
- intr_establish(M188_IVEC, &sc->sc_m188ih);
+ sysconintr_establish(SYSCV_ABRT, &sc->sc_abih, "abort");
+ sysconintr_establish(SYSCV_ACF, &sc->sc_acih, "acfail");
+ sysconintr_establish(SYSCV_SYSF, &sc->sc_sfih, "sysfail");
+ intr_establish(M188_IVEC, &sc->sc_m188ih, self->dv_xname);
config_search(syscon_scan, self, args);
}
int
-sysconintr_establish(vec, ih)
- int vec;
- struct intrhand *ih;
+sysconintr_establish(int vec, struct intrhand *ih, const char *name)
{
#ifdef DIAGNOSTIC
if (vec < 0 || vec >= SYSCON_NVEC)
panic("sysconintr_establish: illegal vector 0x%x\n", vec);
#endif
- return (intr_establish(SYSCON_VECT + vec, ih));
+ return intr_establish(SYSCON_VECT + vec, ih, name);
}
int
diff --git a/sys/arch/mvme88k/dev/sysconreg.h b/sys/arch/mvme88k/dev/sysconreg.h
index 385a486a6ba..b93f2d9d538 100644
--- a/sys/arch/mvme88k/dev/sysconreg.h
+++ b/sys/arch/mvme88k/dev/sysconreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysconreg.h,v 1.6 2004/04/24 19:51:48 miod Exp $ */
+/* $OpenBSD: sysconreg.h,v 1.7 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
@@ -42,4 +42,4 @@
#define SYSCV_TIMER2 0x08
#define SYSCV_TIMER1 0x09
-int sysconintr_establish(int, struct intrhand *);
+int sysconintr_establish(int, struct intrhand *, const char *);
diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c
index 5f61cd87caa..cc1f4136944 100644
--- a/sys/arch/mvme88k/dev/vme.c
+++ b/sys/arch/mvme88k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.37 2004/07/23 22:19:07 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.38 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -464,9 +464,7 @@ vmerw(sc, uio, flags, bus)
*/
int
-vmeintr_establish(vec, ih)
- int vec;
- struct intrhand *ih;
+vmeintr_establish(int vec, struct intrhand *ih, const char *name)
{
struct vmesoftc *sc = (struct vmesoftc *) vme_cd.cd_devs[0];
@@ -480,7 +478,7 @@ vmeintr_establish(vec, ih)
#endif
}
- return intr_establish(vec, ih);
+ return intr_establish(vec, ih, name);
}
#if NPCCTWO > 0
@@ -565,7 +563,7 @@ vme2chip_init(sc)
sc->sc_abih.ih_arg = 0;
sc->sc_abih.ih_wantframe = 1;
sc->sc_abih.ih_ipl = IPL_NMI;
- intr_establish(110, &sc->sc_abih);
+ intr_establish(110, &sc->sc_abih, sc->sc_dev.dv_xname);
irqen = bus_space_read_4(sc->sc_iot, sc->sc_ioh, VME2_IRQEN);
irqen |= VME2_IRQ_AB;
diff --git a/sys/arch/mvme88k/dev/vme.h b/sys/arch/mvme88k/dev/vme.h
index 455a94d8a96..040731c3aeb 100644
--- a/sys/arch/mvme88k/dev/vme.h
+++ b/sys/arch/mvme88k/dev/vme.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.h,v 1.15 2004/04/24 19:51:48 miod Exp $ */
+/* $OpenBSD: vme.h,v 1.16 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -282,7 +282,7 @@ struct vmesoftc {
void *vmepmap(struct device *sc, off_t vmeaddr, int bustype);
int vmerw(struct device *sc, struct uio *uio, int flags, int bus);
-int vmeintr_establish(int vec, struct intrhand *ih);
+int vmeintr_establish(int, struct intrhand *, const char *);
int vme_findvec(int);
int vmescan(struct device *, void *, void *, int);
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index 8402ce355f5..2873e22acc5 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.51 2004/07/20 23:07:06 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.52 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
@@ -48,7 +48,6 @@
#include <sys/dkstat.h>
#include <sys/buf.h>
#include <sys/malloc.h>
-#include <sys/evcount.h>
#include <uvm/uvm.h>
@@ -177,15 +176,10 @@ vsattach(struct device *parent, struct device *self, void *args)
sc->sc_ih_e.ih_wantframe = 0;
sc->sc_ih_e.ih_ipl = ca->ca_ipl;
- vmeintr_establish(sc->sc_nvec, &sc->sc_ih_n);
- vmeintr_establish(sc->sc_evec, &sc->sc_ih_e);
-
- evcount_attach(&sc->sc_intrcnt_n, self->dv_xname,
- (void *)&sc->sc_ih_n.ih_ipl, &evcount_intr);
+ vmeintr_establish(sc->sc_nvec, &sc->sc_ih_n, self->dv_xname);
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);
+ vmeintr_establish(sc->sc_evec, &sc->sc_ih_e, sc->sc_intrname_e);
printf("SCSI ID");
@@ -776,7 +770,6 @@ vs_nintr(void *vsc)
/* Got a valid interrupt on this device */
s = splbio();
- sc->sc_intrcnt_n.ec_count++;
m328_cmd = (void *)crb_read(4, CRB_CTAG);
/*
@@ -821,7 +814,6 @@ vs_eintr(void *vsc)
/* Got a valid interrupt on this device */
s = splbio();
- 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 7c606636f6d..3cac7e42ce9 100644
--- a/sys/arch/mvme88k/dev/vsvar.h
+++ b/sys/arch/mvme88k/dev/vsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsvar.h,v 1.15 2004/07/20 20:32:02 miod Exp $ */
+/* $OpenBSD: vsvar.h,v 1.16 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -95,8 +95,6 @@ struct vs_softc {
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
struct intrhand sc_ih_e, sc_ih_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;
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index 069cd8f8b96..8551cf47184 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.35 2004/07/02 14:00:43 miod Exp $ */
+/* $OpenBSD: vx.c,v 1.36 2004/07/30 19:02:06 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -38,7 +38,6 @@
#include <sys/time.h>
#include <sys/device.h>
#include <sys/syslog.h>
-#include <sys/evcount.h>
#include <machine/autoconf.h>
#include <machine/conf.h>
@@ -66,7 +65,6 @@ struct vx_info {
struct vxsoftc {
struct device sc_dev;
- struct evcount sc_intrcnt;
struct vx_info sc_info[NVXPORTS];
struct vxreg *vx_reg;
vaddr_t board_vaddr;
@@ -227,9 +225,7 @@ vxattach(struct device *parent, struct device *self, void *aux)
sc->sc_ih.ih_wantframe = 0;
sc->sc_ih.ih_ipl = IPL_TTY;
- vmeintr_establish(ca->ca_vec, &sc->sc_ih);
- evcount_attach(&sc->sc_intrcnt, self->dv_xname,
- (void *)&sc->sc_ih.ih_ipl, &evcount_intr);
+ vmeintr_establish(ca->ca_vec, &sc->sc_ih, self->dv_xname);
}
short
@@ -975,8 +971,6 @@ vx_intr(void *arg)
short cmd;
u_char port;
- sc->sc_intrcnt.ec_count++;
-
while (env_isvalid(get_status_head(sc))) {
pktp = get_packet(sc, get_status_head(sc));
valid = env_isvalid(get_status_head(sc));