summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 17:15:00 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 17:15:00 +0000
commitbf71f3692e79a14cfa2d7f921e0c1ce579e2f7cc (patch)
tree19d029b767905f3b3f116a1d9ce99440aba39bf9
parentf4562dcb93c79b7b359529239856fc68fcf8afee (diff)
add interrupt counter; not available on VME32
-rw-r--r--sys/arch/sparc/dev/if_ie.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index c4188e0ccb5..d7c2c803f6b 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -226,6 +226,7 @@ const char *ie_hardware_names[] = {
struct ie_softc {
struct device sc_dev; /* device structure */
struct intrhand sc_ih; /* interrupt info */
+ struct evcnt 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.)*/
@@ -397,7 +398,6 @@ iematch(parent, cf, aux)
/*
* XXX need better probe here so we can figure out what we've got
*/
- ra->ra_len = NBPG;
if (ca->ca_bustype == BUS_OBIO) {
if (probeget(ra->ra_vaddr, 1) == -1)
return (0);
@@ -655,7 +655,6 @@ ieattach(parent, self, aux)
intr_establish(pri, &sc->sc_ih);
break;
case BUS_VME16:
- case BUS_VME32:
sc->sc_ih.ih_fun = ieintr;
sc->sc_ih.ih_arg = sc;
vmeintr_establish(ca->ca_ra.ra_intr[0].int_vec, pri,
@@ -664,6 +663,8 @@ ieattach(parent, self, aux)
#endif /* SUN4 */
}
+ evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
+
bp = ca->ca_ra.ra_bp;
if (bp != NULL && strcmp(bp->name, "ie") == 0 &&
sc->sc_dev.dv_unit == bp->val[1])
@@ -704,8 +705,8 @@ void *v;
* check for parity error
*/
if (sc->hard_type == IE_VME) {
- volatile struct ievme *iev = (volatile struct ievme *)sc->sc_reg
-;
+ volatile struct ievme *iev = (volatile struct ievme *)sc->sc_reg;
+
if (iev->status & IEVME_PERR) {
printf("%s: parity error (ctrl %x @ %02x%04x)\n",
iev->pectrl, iev->pectrl & IEVME_HADDR,
@@ -757,6 +758,7 @@ loop:
if ((status = sc->scb->ie_status) & IE_ST_WHENCE)
goto loop;
+ sc->sc_intrcnt.ev_count++;
return 1;
}