diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/tc/ioasicvar.h | 3 | ||||
-rw-r--r-- | sys/dev/tc/tc.c | 11 | ||||
-rw-r--r-- | sys/dev/tc/tcds.c | 26 | ||||
-rw-r--r-- | sys/dev/tc/tcdsvar.h | 4 | ||||
-rw-r--r-- | sys/dev/tc/tcvar.h | 5 |
5 files changed, 9 insertions, 40 deletions
diff --git a/sys/dev/tc/ioasicvar.h b/sys/dev/tc/ioasicvar.h index 09b95ac8414..b554e9aff52 100644 --- a/sys/dev/tc/ioasicvar.h +++ b/sys/dev/tc/ioasicvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ioasicvar.h,v 1.6 2002/05/02 22:56:06 miod Exp $ */ +/* $OpenBSD: ioasicvar.h,v 1.7 2004/06/28 02:28:43 aaron Exp $ */ /* $NetBSD: ioasicvar.h,v 1.14 2000/10/17 09:45:49 nisimura Exp $ */ /* @@ -66,7 +66,6 @@ extern struct cfdriver ioasic_cd; */ extern tc_addr_t ioasic_base; -const struct evcnt *ioasic_intr_evcnt(struct device *, void *); void ioasic_intr_establish(struct device *, void *, int, int (*)(void *), void *); void ioasic_intr_disestablish(struct device *, void *); diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c index 8f31502139d..73f5a1cd040 100644 --- a/sys/dev/tc/tc.c +++ b/sys/dev/tc/tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc.c,v 1.14 2003/04/27 11:22:54 ho Exp $ */ +/* $OpenBSD: tc.c,v 1.15 2004/06/28 02:28:43 aaron Exp $ */ /* $NetBSD: tc.c,v 1.29 2001/11/13 06:26:10 lukem Exp $ */ /* @@ -91,7 +91,6 @@ tcattach(parent, self, aux) sc->sc_speed = tba->tba_speed; sc->sc_nslots = tba->tba_nslots; sc->sc_slots = tba->tba_slots; - sc->sc_intr_evcnt = tba->tba_intr_evcnt; sc->sc_intr_establish = tba->tba_intr_establish; sc->sc_intr_disestablish = tba->tba_intr_disestablish; sc->sc_get_dma_tag = tba->tba_get_dma_tag; @@ -262,14 +261,6 @@ tc_checkslot(slotbase, namep) return (0); } -const struct evcnt * -tc_intr_evcnt(struct device *dev, void *cookie) -{ - struct tc_softc *sc = tc_cd.cd_devs[0]; - - return ((*sc->sc_intr_evcnt)(dev, cookie)); -} - void tc_intr_establish(dev, cookie, level, handler, arg) struct device *dev; diff --git a/sys/dev/tc/tcds.c b/sys/dev/tc/tcds.c index 4e7d6947641..22aeaeebf2d 100644 --- a/sys/dev/tc/tcds.c +++ b/sys/dev/tc/tcds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcds.c,v 1.3 2003/09/26 21:43:31 miod Exp $ */ +/* $OpenBSD: tcds.c,v 1.4 2004/06/28 02:28:43 aaron Exp $ */ /* $NetBSD: tcds.c,v 1.3 2001/11/13 06:26:10 lukem Exp $ */ /*- @@ -82,10 +82,6 @@ #include <machine/bus.h> -#ifndef EVCNT_COUNTERS -#include <machine/intrcnt.h> -#endif - #include <dev/tc/tcvar.h> #include <dev/tc/tcdsreg.h> #include <dev/tc/tcdsvar.h> @@ -172,7 +168,6 @@ tcdsattach(parent, self, aux) struct tcds_device *td; bus_space_handle_t sbsh[2]; int i, gpi2; - const struct evcnt *pevcnt; td = tcds_lookup(ta->ta_modname); if (td == NULL) @@ -211,7 +206,6 @@ tcdsattach(parent, self, aux) sc->sc_cookie = ta->ta_cookie; - pevcnt = tc_intr_evcnt(parent, sc->sc_cookie); tc_intr_establish(parent, sc->sc_cookie, TC_IPL_BIO, tcds_intr, sc); /* @@ -235,17 +229,11 @@ tcdsattach(parent, self, aux) /* fill in common information first */ for (i = 0; i < 2; i++) { - char *cp; - slotc = &sc->sc_slots[i]; bzero(slotc, sizeof *slotc); /* clear everything */ - cp = slotc->sc_name; - snprintf(cp, sizeof(slotc->sc_name), "chip %d", i); -#ifdef EVCNT_COUNTERS - evcnt_attach_dynamic(&slotc->sc_evcnt, EVCNT_TYPE_INTR, - pevcnt, sc->sc_dv.dv_xname, cp); -#endif + evcount_attach(&slotc->sc_count, sc->sc_dv.dv_xname, NULL, + &evcount_intr); slotc->sc_slot = i; slotc->sc_bst = sc->sc_bst; @@ -502,15 +490,9 @@ tcds_intr(arg) bus_space_write_4(sc->sc_bst, sc->sc_bsh, TCDS_CIR, ir0); tc_syncbus(); -#ifdef EVCNT_COUNTERS -#define INCRINTRCNT(slot) sc->sc_slots[slot].sc_evcnt.ev_count++ -#else -#define INCRINTRCNT(slot) intrcnt[INTRCNT_TCDS + slot]++ -#endif - #define CHECKINTR(slot) \ if (ir & sc->sc_slots[slot].sc_intrbits) { \ - INCRINTRCNT(slot); \ + sc->sc_slots[slot].sc_count.ec_count++; \ (void)(*sc->sc_slots[slot].sc_intrhand) \ (sc->sc_slots[slot].sc_intrarg); \ } diff --git a/sys/dev/tc/tcdsvar.h b/sys/dev/tc/tcdsvar.h index e1470188d10..b5d7a5c8125 100644 --- a/sys/dev/tc/tcdsvar.h +++ b/sys/dev/tc/tcdsvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcdsvar.h,v 1.1 2002/05/02 22:56:06 miod Exp $ */ +/* $OpenBSD: tcdsvar.h,v 1.2 2004/06/28 02:28:43 aaron Exp $ */ /* $NetBSD: tcdsvar.h,v 1.2 2001/08/22 05:00:27 nisimura Exp $ */ /* @@ -39,7 +39,7 @@ struct tcds_slotconfig { int (*sc_intrhand)(void *); /* intr. handler */ void *sc_intrarg; /* intr. handler arg. */ - struct evcnt sc_evcnt; /* intr. count */ + struct evcount sc_count; /* intr. count */ char sc_name[8]; /* ev_name */ /* diff --git a/sys/dev/tc/tcvar.h b/sys/dev/tc/tcvar.h index 35a5db9bc30..6d7319a01ea 100644 --- a/sys/dev/tc/tcvar.h +++ b/sys/dev/tc/tcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcvar.h,v 1.11 2003/04/27 11:22:54 ho Exp $ */ +/* $OpenBSD: tcvar.h,v 1.12 2004/06/28 02:28:43 aaron Exp $ */ /* $NetBSD: tcvar.h,v 1.17 2000/06/04 19:15:15 cgd Exp $ */ /* @@ -70,7 +70,6 @@ struct tc_softc { int sc_nslots; struct tc_slotdesc *sc_slots; - const struct evcnt *(*sc_intr_evcnt)(struct device *, void *); void (*sc_intr_establish)(struct device *, void *, int, int (*)(void *), void *); void (*sc_intr_disestablish)(struct device *, void *); @@ -93,7 +92,6 @@ struct tcbus_attach_args { /* TC bus resource management; XXX will move elsewhere eventually. */ - const struct evcnt *(*tba_intr_evcnt)(struct device *, void *); void (*tba_intr_establish)(struct device *, void *, int, int (*)(void *), void *); void (*tba_intr_disestablish)(struct device *, void *); @@ -142,7 +140,6 @@ struct tc_builtin { int tc_checkslot(tc_addr_t, char *); void tc_devinfo(const char *, char *, size_t); void tcattach(struct device *, struct device *, void *); -const struct evcnt *tc_intr_evcnt(struct device *, void *); void tc_intr_establish(struct device *, void *, int, int (*)(void *), void *); void tc_intr_disestablish(struct device *, void *); |