Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mvme68k Deprecate intrcnt/intrnames in favour of th...



details:   https://anonhg.NetBSD.org/src/rev/372ce7121e77
branches:  trunk
changeset: 510537:372ce7121e77
user:      scw <scw%NetBSD.org@localhost>
date:      Thu May 31 18:46:07 2001 +0000

description:
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.

diffstat:

 sys/arch/mvme68k/dev/clmpcc_pcctwo.c |  12 +++--
 sys/arch/mvme68k/dev/clock_pcc.c     |  19 ++++++---
 sys/arch/mvme68k/dev/clock_pcctwo.c  |  17 +++++---
 sys/arch/mvme68k/dev/if_ie.c         |  13 ++++++-
 sys/arch/mvme68k/dev/if_le.c         |   7 ++-
 sys/arch/mvme68k/dev/if_levar.h      |   3 +-
 sys/arch/mvme68k/dev/lpt_pcc.c       |   9 +++-
 sys/arch/mvme68k/dev/lpt_pcctwo.c    |   9 +++-
 sys/arch/mvme68k/dev/lptvar.h        |   3 +-
 sys/arch/mvme68k/dev/mainbus.c       |  21 +++++++++-
 sys/arch/mvme68k/dev/mainbus.h       |   5 +-
 sys/arch/mvme68k/dev/memc.c          |   5 +-
 sys/arch/mvme68k/dev/mvmebus.c       |  16 ++++++--
 sys/arch/mvme68k/dev/mvmebus.h       |   9 +++-
 sys/arch/mvme68k/dev/ncrsc_pcctwo.c  |  54 +++++++++++++++++------------
 sys/arch/mvme68k/dev/pcc.c           |  14 ++++---
 sys/arch/mvme68k/dev/pcctwo.c        |  14 ++++---
 sys/arch/mvme68k/dev/pcctwovar.h     |  12 +++++-
 sys/arch/mvme68k/dev/pccvar.h        |  10 ++++-
 sys/arch/mvme68k/dev/vme_pcc.c       |  21 +++++++----
 sys/arch/mvme68k/dev/vme_two.c       |  25 +++++++++---
 sys/arch/mvme68k/dev/wdsc.c          |  10 +++-
 sys/arch/mvme68k/dev/zs.c            |  23 +++++++----
 sys/arch/mvme68k/dev/zs_pcc.c        |   7 ++-
 sys/arch/mvme68k/dev/zs_pcctwo.c     |   7 ++-
 sys/arch/mvme68k/include/z8530var.h  |   3 +-
 sys/arch/mvme68k/mvme68k/autoconf.c  |   6 ++-
 sys/arch/mvme68k/mvme68k/clock.c     |   7 +---
 sys/arch/mvme68k/mvme68k/isr.c       |  66 ++++++++++++++++++++++++++++++------
 sys/arch/mvme68k/mvme68k/isr.h       |  16 ++++++--
 sys/arch/mvme68k/mvme68k/locore.s    |  51 ++++++---------------------
 sys/arch/mvme68k/mvme68k/machdep.c   |  15 +-------
 sys/arch/mvme68k/mvme68k/vectors.s   |   6 +-
 33 files changed, 322 insertions(+), 193 deletions(-)

diffs (truncated from 1506 to 300 lines):

diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/clmpcc_pcctwo.c
--- a/sys/arch/mvme68k/dev/clmpcc_pcctwo.c      Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/clmpcc_pcctwo.c      Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clmpcc_pcctwo.c,v 1.6 2000/11/24 09:36:40 scw Exp $ */
+/*     $NetBSD: clmpcc_pcctwo.c,v 1.7 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -132,15 +132,17 @@
        sc->sc_rpilr = 0x03;
        sc->sc_tpilr = 0x02;
        sc->sc_mpilr = 0x01;
+       sc->sc_evcnt = pcctwointr_evcnt(level);
 
        /* Do common parts of CD2401 configuration. */
        clmpcc_attach(sc);
 
        /* Hook the interrupts */
-       pcctwointr_establish(PCCTWOV_SCC_RX, clmpcc_rxintr, level, sc);
-       pcctwointr_establish(PCCTWOV_SCC_RX_EXCEP, clmpcc_rxintr, level, sc);
-       pcctwointr_establish(PCCTWOV_SCC_TX, clmpcc_txintr, level, sc);
-       pcctwointr_establish(PCCTWOV_SCC_MODEM, clmpcc_mdintr, level, sc);
+       pcctwointr_establish(PCCTWOV_SCC_RX, clmpcc_rxintr, level, sc, NULL);
+       pcctwointr_establish(PCCTWOV_SCC_RX_EXCEP, clmpcc_rxintr, level, sc,
+           NULL);
+       pcctwointr_establish(PCCTWOV_SCC_TX, clmpcc_txintr, level, sc, NULL);
+       pcctwointr_establish(PCCTWOV_SCC_MODEM, clmpcc_mdintr, level, sc, NULL);
 }
 
 void
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/clock_pcc.c
--- a/sys/arch/mvme68k/dev/clock_pcc.c  Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/clock_pcc.c  Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock_pcc.c,v 1.7 2001/04/14 13:53:05 scw Exp $        */
+/*     $NetBSD: clock_pcc.c,v 1.8 2001/05/31 18:46:07 scw Exp $        */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -134,9 +134,17 @@
        /* Ensure our interrupts get disabled at shutdown time. */
        (void) shutdownhook_establish(clock_pcc_shutdown, NULL);
 
+       /* Register the event counters */
+       evcnt_attach_dynamic(&clock_profcnt, EVCNT_TYPE_INTR,
+           pccintr_evcnt(pa->pa_ipl), "clock", "profint");
+       evcnt_attach_dynamic(&clock_statcnt, EVCNT_TYPE_INTR,
+           pccintr_evcnt(pa->pa_ipl), "clock", "statint");
+
        /* Attach the interrupt handlers. */
-       pccintr_establish(PCCV_TIMER1, clock_pcc_profintr, pa->pa_ipl, NULL);
-       pccintr_establish(PCCV_TIMER2, clock_pcc_statintr, pa->pa_ipl, NULL);
+       pccintr_establish(PCCV_TIMER1, clock_pcc_profintr, pa->pa_ipl,
+           NULL, &clock_profcnt);
+       pccintr_establish(PCCV_TIMER2, clock_pcc_statintr, pa->pa_ipl,
+           NULL, &clock_statcnt);
        sc->sc_clock_lvl = pa->pa_ipl | PCC_IENABLE | PCC_TIMERACK;
 }
 
@@ -210,10 +218,8 @@
            clock_pcc_sc->sc_clock_lvl);
        __asm __volatile("movw %0,%%sr" : : "di" (s));
 
-       for (cr >>= PCC_TIMEROVFLSHIFT; cr; cr--) {
+       for (cr >>= PCC_TIMEROVFLSHIFT; cr; cr--)
                hardclock(frame);
-               clock_profcnt.ev_count++;
-       }
 
        return (1);
 }
@@ -227,7 +233,6 @@
        pcc_reg_write(sys_pcc, PCCREG_TMR2_INTR_CTRL, 0);
 
        statclock((struct clockframe *) frame);
-       clock_statcnt.ev_count++;
 
        pcc_reg_write16(sys_pcc, PCCREG_TMR2_PRELOAD,
            pcc_timer_us2lim(CLOCK_NEWINT(clock_statvar, clock_statmin)));
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/clock_pcctwo.c
--- a/sys/arch/mvme68k/dev/clock_pcctwo.c       Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/clock_pcctwo.c       Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock_pcctwo.c,v 1.5 2001/04/14 13:53:06 scw Exp $ */
+/*     $NetBSD: clock_pcctwo.c,v 1.6 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -134,11 +134,17 @@
        sc->sc_clock_lvl = (pa->pa_ipl & PCCTWO_ICR_LEVEL_MASK) |
            PCCTWO_ICR_ICLR | PCCTWO_ICR_IEN;
 
+       /* Register the event counters */
+       evcnt_attach_dynamic(&clock_profcnt, EVCNT_TYPE_INTR,
+           pcctwointr_evcnt(pa->pa_ipl), "clock", "profint");
+       evcnt_attach_dynamic(&clock_statcnt, EVCNT_TYPE_INTR,
+           pcctwointr_evcnt(pa->pa_ipl), "clock", "statint");
+
        /* Attach the interrupt handlers. */
        pcctwointr_establish(PCCTWOV_TIMER1, clock_pcctwo_profintr,
-           pa->pa_ipl, NULL);
+           pa->pa_ipl, NULL, &clock_profcnt);
        pcctwointr_establish(PCCTWOV_TIMER2, clock_pcctwo_statintr,
-           pa->pa_ipl, NULL);
+           pa->pa_ipl, NULL, &clock_statcnt);
 }
 
 void
@@ -218,10 +224,8 @@
            clock_pcctwo_sc->sc_clock_lvl);
        __asm __volatile("movw %0,%%sr" : : "di" (s));
 
-       for (cr = PCCTWO_TT_CTRL_OVF(cr); cr; cr--) {
+       for (cr = PCCTWO_TT_CTRL_OVF(cr); cr; cr--)
                hardclock(frame);
-               clock_profcnt.ev_count++;
-       }
 
        return (1);
 }
@@ -246,7 +250,6 @@
        pcc2_reg_write(sys_pcctwo, PCC2REG_TIMER2_ICSR,
            clock_pcctwo_sc->sc_clock_lvl);
 
-       clock_statcnt.ev_count++;
        return (1);
 }
 
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/if_ie.c
--- a/sys/arch/mvme68k/dev/if_ie.c      Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/if_ie.c      Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie.c,v 1.10 2001/03/11 20:24:52 scw Exp $ */
+/*     $NetBSD: if_ie.c,v 1.11 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -71,6 +71,7 @@
        struct ie_softc ps_ie;
        bus_space_tag_t ps_bust;
        bus_space_handle_t ps_bush;
+       struct evcnt ps_evcnt;
 };
 
 struct cfattach ie_pcctwo_ca = {
@@ -140,8 +141,11 @@
        struct ie_softc *sc;
        int when;
 {
+       struct ie_pcctwo_softc *ps;
        u_int8_t reg;
 
+       ps = (struct ie_pcctwo_softc *) sc;
+
        if (when == INTR_EXIT) {
                reg = pcc2_reg_read(sys_pcctwo, PCC2REG_ETH_ICSR);
                reg |= PCCTWO_ICR_ICLR;
@@ -338,6 +342,11 @@
        /* Attach the MI back-end */
        i82586_attach(sc, "onboard", mvme_ea, NULL, 0, 0);
 
+       /* Register the event counter */
+       evcnt_attach_dynamic(&ps->ps_evcnt, EVCNT_TYPE_INTR,
+           pcctwointr_evcnt(pa->pa_ipl), "ether", sc->sc_dev.dv_xname);
+
        /* Finally, hook the hardware interrupt */
-       pcctwointr_establish(PCCTWOV_LANC_IRQ, i82586_intr, pa->pa_ipl, sc);
+       pcctwointr_establish(PCCTWOV_LANC_IRQ, i82586_intr, pa->pa_ipl, sc,
+           &ps->ps_evcnt);
 }
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/if_le.c
--- a/sys/arch/mvme68k/dev/if_le.c      Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/if_le.c      Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le.c,v 1.24 2001/05/30 12:28:46 mrg Exp $   */
+/*     $NetBSD: if_le.c,v 1.25 2001/05/31 18:46:07 scw Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -224,7 +224,10 @@
 
        am7990_config(&lsc->sc_am7990);
 
-       pccintr_establish(PCCV_LE, am7990_intr, pa->pa_ipl, sc);
+       evcnt_attach_dynamic(&lsc->sc_evcnt, EVCNT_TYPE_INTR,
+           pccintr_evcnt(pa->pa_ipl), "ether", sc->sc_dev.dv_xname);
+
+       pccintr_establish(PCCV_LE, am7990_intr, pa->pa_ipl, sc, &lsc->sc_evcnt);
 
        pcc_reg_write(sys_pcc, PCCREG_LANCE_INTR_CTRL,
            pa->pa_ipl | PCC_IENABLE);
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/if_levar.h
--- a/sys/arch/mvme68k/dev/if_levar.h   Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/if_levar.h   Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_levar.h,v 1.4 2000/03/18 22:33:03 scw Exp $ */
+/*     $NetBSD: if_levar.h,v 1.5 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -85,4 +85,5 @@
        struct  am7990_softc sc_am7990; /* glue to MI code */
        bus_space_tag_t sc_bust;
        bus_space_handle_t sc_bush;
+       struct evcnt sc_evcnt;
 };
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/lpt_pcc.c
--- a/sys/arch/mvme68k/dev/lpt_pcc.c    Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/lpt_pcc.c    Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpt_pcc.c,v 1.3 2000/03/18 22:33:03 scw Exp $ */
+/*     $NetBSD: lpt_pcc.c,v 1.4 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -134,10 +134,15 @@
         */
        lpt_attach_subr(sc);
 
+       /* Register the event counter */
+       evcnt_attach_dynamic(&sc->sc_evcnt, EVCNT_TYPE_INTR,
+           pccintr_evcnt(sc->sc_ipl), "printer", sc->sc_dev.dv_xname);
+
        /*
         * Hook into the printer interrupt
         */
-       pccintr_establish(PCCV_PRINTER, lpt_pcc_intr, sc->sc_ipl, sc);
+       pccintr_establish(PCCV_PRINTER, lpt_pcc_intr, sc->sc_ipl, sc,
+           &sc->sc_evcnt);
 }
 
 /*
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/lpt_pcctwo.c
--- a/sys/arch/mvme68k/dev/lpt_pcctwo.c Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/lpt_pcctwo.c Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpt_pcctwo.c,v 1.4 2000/09/06 19:51:43 scw Exp $ */
+/*     $NetBSD: lpt_pcctwo.c,v 1.5 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -142,10 +142,15 @@
         */
        lpt_attach_subr(sc);
 
+       /* Register the event counter */
+       evcnt_attach_dynamic(&sc->sc_evcnt, EVCNT_TYPE_INTR,
+           pcctwointr_evcnt(sc->sc_ipl), "printer", sc->sc_dev.dv_xname);
+
        /*
         * Hook into the printer interrupt
         */
-       pcctwointr_establish(PCCTWOV_PRT_ACK, lpt_pcctwo_intr, sc->sc_ipl, sc);
+       pcctwointr_establish(PCCTWOV_PRT_ACK, lpt_pcctwo_intr, sc->sc_ipl, sc,
+           &sc->sc_evcnt);
 }
 
 /*
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/lptvar.h
--- a/sys/arch/mvme68k/dev/lptvar.h     Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/lptvar.h     Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lptvar.h,v 1.4 2000/03/23 06:41:28 thorpej Exp $ */
+/*     $NetBSD: lptvar.h,v 1.5 2001/05/31 18:46:07 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -73,6 +73,7 @@
        int                     sc_ipl;
        u_char                  sc_icr;
        u_char                  sc_laststatus;
+       struct evcnt            sc_evcnt;
 };
 
 
diff -r 9fdbd51d4248 -r 372ce7121e77 sys/arch/mvme68k/dev/mainbus.c
--- a/sys/arch/mvme68k/dev/mainbus.c    Thu May 31 18:44:48 2001 +0000
+++ b/sys/arch/mvme68k/dev/mainbus.c    Thu May 31 18:46:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.7 2000/12/03 15:37:46 scw Exp $  */
+/*     $NetBSD: mainbus.c,v 1.8 2001/05/31 18:46:07 scw Exp $  */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -84,7 +84,6 @@
 };
 #endif
 
-
 struct mvme68k_bus_dma_tag _mainbus_dma_tag = {
        NULL,
        _bus_dmamap_create,
@@ -176,6 +175,22 @@
 
                (void) config_found(self, &ma, mainbus_print);
        }
+
+       /*
+        * Attach Industry Pack modules on mvme162 and mvme172



Home | Main Index | Thread Index | Old Index