Adjust to new evcnt stuff.

This commit is contained in:
matt 2000-06-05 00:09:17 +00:00
parent be033824b6
commit 2f85fe7adb
26 changed files with 128 additions and 166 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.17 2000/06/04 02:19:25 matt Exp $ */
/* $NetBSD: if_le.c,v 1.18 2000/06/05 00:09:19 matt Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -189,7 +189,8 @@ le_ibus_attach(parent, self, aux)
return;
scb_vecalloc(vec, (void (*)(void *))am7990_intr, sc,
SCB_ISTACK, &sc->sc_intrcnt);
evcnt_attach(self, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
self->dv_xname, "intr");
printf(": vec %o ipl %x\n%s", vec, br, self->dv_xname);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_vsbus.c,v 1.7 2000/06/04 02:19:25 matt Exp $ */
/* $NetBSD: if_le_vsbus.c,v 1.8 2000/06/05 00:09:19 matt Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -231,7 +231,8 @@ le_vsbus_attach(parent, self, aux)
scb_vecalloc(va->va_cvec, (void (*)(void *)) am7990_intr, sc,
SCB_ISTACK, &sc->sc_intrcnt);
evcnt_attach(self, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
self->dv_xname, "intr");
/*
* Allocate a (DMA-safe) block for all descriptors and buffers.

View File

@ -1,4 +1,4 @@
/* $NetBSD: scb.h,v 1.9 2000/06/04 17:58:19 ragge Exp $ */
/* $NetBSD: scb.h,v 1.10 2000/06/05 00:09:19 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -129,6 +129,7 @@ struct ivec_dsp {
extern const struct ivec_dsp idsptch;
extern struct scb *scb;
extern struct ivec_dsp *scb_vec;
extern struct evcnt devipl_intrcnts[4]; /* IPL 2[0123] */
extern paddr_t scb_init (paddr_t);
extern int scb_vecref (int *, int *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mba.c,v 1.21 2000/06/04 18:04:39 ragge Exp $ */
/* $NetBSD: mba.c,v 1.22 2000/06/05 00:09:19 matt Exp $ */
/*
* Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -138,7 +138,8 @@ mbaattach(struct device *parent, struct device *self, void *aux)
for (i = 14; i < 18; i++)
scb_vecalloc(vecnum(0, i, sa->sa_nexnum),
mbaintr, sc, SCB_ISTACK, &sc->sc_intrcnt);
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
self->dv_xname, "intr");
sc->sc_first = 0;
sc->sc_last = (void *)&sc->sc_first;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uba.c,v 1.47 2000/06/04 19:30:16 matt Exp $ */
/* $NetBSD: uba.c,v 1.48 2000/06/05 00:09:20 matt Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
* Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@ -154,7 +154,8 @@ dw780_attach(parent, self, aux)
for (i = 0; i < 4; i++)
scb_vecalloc(256 + i * 64 + sa->nexnum * 4, uba_dw780int,
sc->uh_dev.dv_unit, SCB_ISTACK, &sc->uh_intrcnt);
evcnt_attach(&sc->uh_dev, "intr", &sc->uh_intrcnt);
evcnt_attach_dynamic(&sc->uh_intrcnt, EVCNT_TYPE_INTR, NULL,
sc->uh_dev.dev_xname, "intr");
uba_attach(sc, (parent->dv_unit ? UMEMB8600(ubaddr) :
UMEMA8600(ubaddr)) + (UBAPAGES * VAX_NBPG));

View File

@ -1,4 +1,4 @@
/* $NetBSD: uba_sbi.c,v 1.6 2000/06/04 17:59:50 ragge Exp $ */
/* $NetBSD: uba_sbi.c,v 1.7 2000/06/05 00:09:20 matt Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
* Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@ -155,7 +155,8 @@ dw780_attach(struct device *parent, struct device *self, void *aux)
for (i = 14; i < 17; i++)
scb_vecalloc(vecnum(0, i, sa->sa_nexnum), uba_dw780int,
sc, SCB_ISTACK, &sc->uv_sc.uh_intrcnt);
evcnt_attach(&sc->uv_sc.uh_dev, "intr", &sc->uv_sc.uh_intrcnt);
evcnt_attach_dynamic(&sc->uv_sc.uh_intrcnt, EVCNT_TYPE_INTR, NULL,
sc->uv_sc.uh_dev.dv_xname, "intr");
/*
* Fill in variables used by the sgmap system.

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.35 2000/06/04 06:16:58 matt Exp $ */
/* $NetBSD: clock.c,v 1.36 2000/06/05 00:09:20 matt Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -61,7 +61,8 @@
int yeartonum __P((int));
int numtoyear __P((int));
struct evcnt clock_intrcnt;
struct evcnt clock_intrcnt =
EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "clock", "intr");
/*
* microtime() should return number of usecs in struct timeval.
@ -191,7 +192,7 @@ cpu_initclocks()
{
mtpr(-10000, PR_NICR); /* Load in count register */
mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */
evcnt_attach(NULL, "clock", &clock_intrcnt);
evcnt_attach_static(&clock_intrcnt);
}
/*

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.20 2000/06/04 02:19:26 matt Exp $
# $NetBSD: genassym.cf,v 1.21 2000/06/05 00:09:20 matt Exp $
#
# Copyright (c) 1997 Ludd, University of Lule}, Sweden.
# All rights reserved.
@ -155,3 +155,5 @@ define SH_NEXT offsetof(struct softintr_handler, sh_link.le_next)
define SH_PENDING offsetof(struct softintr_handler, sh_pending)
define VC_DIAGTIMM offsetof(struct vs_cpu, vc_diagtimm)
define PSL_IS PSL_IS

View File

@ -1,4 +1,4 @@
/* $NetBSD: intvec.s,v 1.45 2000/06/04 06:16:59 matt Exp $ */
/* $NetBSD: intvec.s,v 1.46 2000/06/05 00:09:20 matt Exp $ */
/*
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
@ -337,7 +337,7 @@ hardclock:
mtpr $0xc1,$PR_ICCS # Reset interrupt flag
pushr $0x3f
incl _clock_intrcnt+EV_COUNT # count the number of clock interrupts
# adwc $0,_clock_intrcnt+EV_COUNT+4
adwc $0,_clock_intrcnt+EV_COUNT+4
#if VAX46
cmpl _vax_boardtype,$VAX_BTYP_46
bneq 1f

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr.s,v 1.46 2000/06/04 18:13:06 matt Exp $ */
/* $NetBSD: subr.s,v 1.47 2000/06/05 00:09:20 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -157,7 +157,7 @@ _cmn_idsptch:
movl 8(r0),r1 # get evcnt pointer
beql 1f # no ptr, skip increment
incl EV_COUNT(r1) # increment low longword
# adwc $0,EV_COUNT+4(r1) # add any carry to hi longword
adwc $0,EV_COUNT+4(r1) # add any carry to hi longword
1: pushl 4(r0) # push argument
calls $1,*(r0) # call interrupt routine
popr $0x3f # pop registers

View File

@ -1,4 +1,4 @@
/* $NetBSD: asc_vsbus.c,v 1.15 2000/06/04 02:19:28 matt Exp $ */
/* $NetBSD: asc_vsbus.c,v 1.16 2000/06/05 00:09:20 matt Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.15 2000/06/04 02:19:28 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.16 2000/06/05 00:09:20 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -275,7 +275,8 @@ asc_vsbus_attach(struct device *parent, struct device *self, void *aux)
scb_vecalloc(va->va_cvec, (void (*)(void *)) ncr53c9x_intr,
&asc->sc_ncr53c9x, SCB_ISTACK, &asc->sc_intrcnt);
evcnt_attach(self, "intr", &asc->sc_intrcnt);
evcnt_attach_dynamic(&asc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
self->dv_xname, "intr");
/*
* XXX More of this should be in ncr53c9x_attach(), but

View File

@ -1,4 +1,4 @@
/* $NetBSD: dz_ibus.c,v 1.17 2000/06/04 02:19:29 matt Exp $ */
/* $NetBSD: dz_ibus.c,v 1.18 2000/06/05 00:09:20 matt Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -149,7 +149,7 @@ dz_vsbus_attach(parent, self, aux)
printf("\n%s: 4 lines", self->dv_xname);
dzattach(sc);
dzattach(sc, NULL);
if (((vax_confdata & 0x80) == 0) ||/* workstation, have lkc */
(vax_boardtype == VAX_BTYP_48))

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr.c,v 1.29 2000/06/04 06:16:59 matt Exp $ */
/* $NetBSD: ncr.c,v 1.30 2000/06/05 00:09:21 matt Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -152,7 +152,8 @@ si_attach(parent, self, aux)
scb_vecalloc(va->va_cvec, (void (*)(void *)) ncr5380_intr, sc,
SCB_ISTACK, &sc->ncr_intrcnt);
evcnt_attach(self, "intr", &sc->ncr_intrcnt);
evcnt_attach_dynamic(&sc->ncr_intrcnt, EVCNT_TYPE_INTR, NULL,
self->dv_xname, "intr");
/*
* DMA area mapin.

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ni.c,v 1.4 2000/06/04 06:17:00 matt Exp $ */
/* $NetBSD: if_ni.c,v 1.5 2000/06/05 00:09:17 matt Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -250,7 +250,8 @@ niattach(parent, self, aux)
bi_intr_establish(ba->ba_icookie, ba->ba_ivec,
niintr, sc, &sc->sc_intrcnt);
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
sc->sc_dev.dv_xname, "intr");
ni_getpgs(sc, sizeof(struct ni_gvppqb), (caddr_t *)&sc->sc_gvppqb,
(paddr_t *)&sc->sc_pgvppqb);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kdb.c,v 1.20 2000/06/04 06:17:01 matt Exp $ */
/* $NetBSD: kdb.c,v 1.21 2000/06/05 00:09:17 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -154,6 +154,8 @@ kdbattach(parent, self, aux)
printf("\n");
bi_intr_establish(ba->ba_icookie, ba->ba_ivec,
kdbintr, sc, &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
sc->sc_dev.dv_xname, "intr");
sc->sc_iot = ba->ba_iot;
sc->sc_ioh = ba->ba_ioh;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */
/* $NetBSD: dhu.c,v 1.20 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
* Copyright (c) 1992, 1993
@ -251,8 +251,10 @@ dhu_attach(parent, self, aux)
dhurint, sc, &sc->sc_rintrcnt);
uba_intr_establish(ua->ua_icookie, ua->ua_cvec + 4,
dhuxint, sc, &sc->sc_tintrcnt);
evcnt_attach(&sc->sc_dev, "rintr", &sc->sc_rintrcnt);
evcnt_attach(&sc->sc_dev, "tintr", &sc->sc_tintrcnt);
evcnt_attach_dynamic(&sc->sc_rintrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "rintr");
evcnt_attach_dynamic(&sc->sc_tintrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "tintr");
}
/* Receiver Interrupt */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dl.c,v 1.13 2000/06/04 06:17:02 matt Exp $ */
/* $NetBSD: dl.c,v 1.14 2000/06/05 00:09:18 matt Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -95,7 +95,6 @@
#include <sys/device.h>
#include <machine/bus.h>
#include <machine/scb.h>
#include <dev/qbus/ubavar.h>
@ -124,7 +123,7 @@ struct tty * dltty (dev_t);
int dlclose (dev_t, int, int, struct proc *);
int dlread (dev_t, struct uio *, int);
int dlwrite (dev_t, struct uio *, int);
int dlioctl (dev_t, int, caddr_t, int, struct proc *);
int dlioctl (dev_t, unsigned long, caddr_t, int, struct proc *);
void dlstop (struct tty *, int);
struct cfattach dl_ca = {
@ -142,10 +141,7 @@ struct cfattach dl_ca = {
/* then complete the housecleaning for full operation */
static int
dl_match (parent, cf, aux)
struct device * parent;
struct cfdata *cf;
void *aux;
dl_match (struct device *parent, struct cfdata *cf, void *aux)
{
struct uba_attach_args *ua = aux;
@ -201,9 +197,7 @@ dl_match (parent, cf, aux)
}
static void
dl_attach (parent, self, aux)
struct device *parent, *self;
void *aux;
dl_attach (struct device *parent, struct device *self, void *aux)
{
struct dl_softc *sc = (void *)self;
struct uba_attach_args *ua = aux;
@ -226,8 +220,10 @@ dl_attach (parent, self, aux)
dlxint, sc, &sc->sc_tintrcnt);
uba_intr_establish(ua->ua_icookie, ua->ua_cvec - 4,
dlrint, sc, &sc->sc_rintrcnt);
evcnt_attach(&sc->sc_dev, "rintr", &sc->sc_rintrcnt);
evcnt_attach(&sc->sc_dev, "tintr", &sc->sc_tintrcnt);
evcnt_attach_dynamic(&sc->sc_rintrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "rintr");
evcnt_attach_dynamic(&sc->sc_tintrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "tintr");
printf("\n");
}
@ -235,53 +231,53 @@ dl_attach (parent, self, aux)
/* Receiver Interrupt Handler */
static void
dlrint(arg)
void *arg;
dlrint(void *arg)
{
struct dl_softc *sc = arg;
struct tty *tp;
int cc;
unsigned c;
struct dl_softc *sc = arg;
if (DL_READ_WORD(DL_UBA_RCSR) & DL_RCSR_RX_DONE) {
struct tty *tp = sc->sc_tty;
unsigned c;
int cc;
c = DL_READ_WORD(DL_UBA_RBUF);
cc = c & 0xFF;
tp = sc->sc_tty;
if (!(tp->t_state & TS_ISOPEN)) {
wakeup((caddr_t)&tp->t_rawq);
return;
}
if (c & DL_RBUF_OVERRUN_ERR)
if (c & DL_RBUF_OVERRUN_ERR) {
/*
* XXX: This should really be logged somwhere
* else where we can afford the time.
*/
log(LOG_WARNING, "%s: rx overrun\n",
sc->sc_dev.dv_xname);
}
if (c & DL_RBUF_FRAMING_ERR)
cc |= TTY_FE;
if (c & DL_RBUF_PARITY_ERR)
cc |= TTY_PE;
(*linesw[tp->t_line].l_rint)(cc, tp);
} else
#if defined(DIAGNOSTIC)
} else {
log(LOG_WARNING, "%s: stray rx interrupt\n",
sc->sc_dev.dv_xname);
return;
#endif
}
}
/* Transmitter Interrupt Handler */
static void
dlxint(arg)
void *arg;
dlxint(void *arg)
{
struct dl_softc *sc = arg;
struct tty *tp;
tp = sc->sc_tty;
struct tty *tp = sc->sc_tty;
tp->t_state &= ~(TS_BUSY | TS_FLUSH);
if (tp->t_line)
(*linesw[tp->t_line].l_start)(tp);
@ -292,14 +288,11 @@ dlxint(arg)
}
int
dlopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
dlopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct tty *tp;
int unit;
struct dl_softc *sc;
int unit;
unit = minor(dev);
@ -334,18 +327,10 @@ dlopen(dev, flag, mode, p)
/*ARGSUSED*/
int
dlclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
dlclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct dl_softc *sc;
struct tty *tp;
int unit;
unit = minor(dev);
sc = dl_cd.cd_devs[unit];
tp = sc->sc_tty;
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
(*linesw[tp->t_line].l_close)(tp, flag);
@ -356,53 +341,30 @@ dlclose(dev, flag, mode, p)
}
int
dlread(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
dlread(dev_t dev, struct uio *uio, int flag)
{
struct tty *tp;
struct dl_softc *sc;
int unit;
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
unit = minor(dev);
sc = dl_cd.cd_devs[unit];
tp = sc->sc_tty;
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
}
int
dlwrite(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
dlwrite(dev_t dev, struct uio *uio, int flag)
{
struct tty *tp;
struct dl_softc *sc;
int unit;
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
unit = minor(dev);
sc = dl_cd.cd_devs[unit];
tp = sc->sc_tty;
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
int
dlioctl(dev, cmd, data, flag, p)
dev_t dev;
int cmd;
caddr_t data;
int flag;
struct proc *p;
dlioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag, struct proc *p)
{
struct dl_softc *sc;
struct tty *tp;
int unit;
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
int error;
unit = minor(dev);
sc = dl_cd.cd_devs[unit];
tp = sc->sc_tty;
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
@ -433,46 +395,29 @@ dlioctl(dev, cmd, data, flag, p)
}
struct tty *
dltty(dev)
dev_t dev;
dltty(dev_t dev)
{
struct dl_softc* sc;
sc = dl_cd.cd_devs[minor(dev)];
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
return sc->sc_tty;
}
void
dlstop(tp, flag)
struct tty *tp;
int flag;
dlstop(struct tty *tp, int flag)
{
struct dl_softc *sc;
int unit, s;
int s = spltty();
unit = minor(tp->t_dev);
sc = dl_cd.cd_devs[unit];
s = spltty();
if (tp->t_state & TS_BUSY)
if (!(tp->t_state & TS_TTSTOP))
tp->t_state |= TS_FLUSH;
if ((tp->t_state & (TS_BUSY|TS_TTSTOP)) == TS_BUSY)
tp->t_state |= TS_FLUSH;
splx(s);
}
static void
dlstart(tp)
struct tty *tp;
dlstart(struct tty *tp)
{
struct dl_softc *sc;
int unit;
int s;
struct dl_softc *sc = dl_cd.cd_devs[minor(tp->t_dev)];
int s = spltty();
unit = minor(tp->t_dev);
sc = dl_cd.cd_devs[unit];
s = spltty();
if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
goto out;
if (tp->t_outq.c_cc <= tp->t_lowat) {
@ -497,9 +442,7 @@ out:
/*ARGSUSED*/
static int
dlparam(tp, t)
struct tty *tp;
struct termios *t;
dlparam(struct tty *tp, struct termios *t)
{
/*
* All this kind of stuff (speed, character format, whatever)
@ -510,9 +453,7 @@ dlparam(tp, t)
}
static void
dlbrk(sc, state)
struct dl_softc *sc;
int state;
dlbrk(struct dl_softc *sc, int state)
{
int s = spltty();

View File

@ -1,4 +1,4 @@
/* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */
/* $NetBSD: dz.c,v 1.24 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
* Copyright (c) 1992, 1993
@ -58,9 +58,6 @@
#endif
#include <machine/bus.h>
#include <machine/pte.h>
#include <machine/trap.h>
#include <machine/cpu.h>
#include <dev/qbus/dzreg.h>
#include <dev/qbus/dzvar.h>
@ -113,10 +110,10 @@ static struct speedtab dzspeedtab[] =
{ -1, -1 }
};
static void dzstart(struct tty *);
static int dzparam(struct tty *, struct termios *);
static void dzstart(struct tty *);
static int dzparam(struct tty *, struct termios *);
static unsigned dzmctl(struct dz_softc *, int, int, int);
static void dzscan(void *);
static void dzscan(void *);
cdev_decl(dz);
/*
@ -130,7 +127,7 @@ struct callout dzscan_ch;
#define DZ_DZV 4 /* Q-bus DZV-11 or DZQ-11 */
void
dzattach(struct dz_softc *sc)
dzattach(struct dz_softc *sc, struct evcnt *parent_evcnt)
{
int n;
@ -146,8 +143,10 @@ dzattach(struct dz_softc *sc)
for (n = 0; n < sc->sc_type; n++)
sc->sc_dz[n].dz_tty = ttymalloc();
evcnt_attach(&sc->sc_dev, "rintr", &sc->sc_rintrcnt);
evcnt_attach(&sc->sc_dev, "tintr", &sc->sc_tintrcnt);
evcnt_attach_dynamic(&sc->sc_rintrcnt, EVCNT_TYPE_INTR, parent_evcnt,
sc->sc_dev.dv_xname, "rintr");
evcnt_attach_dynamic(&sc->sc_tintrcnt, EVCNT_TYPE_INTR, parent_evcnt,
sc->sc_dev.dv_xname, "tintr");
/* Alas no interrupt on modem bit changes, so we manually scan */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dz_uba.c,v 1.11 2000/06/04 06:17:02 matt Exp $ */
/* $NetBSD: dz_uba.c,v 1.12 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden. All rights reserved.
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
@ -113,7 +113,7 @@ dz_uba_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
struct dz_softc *sc = (void *)self;
struct dz_softc *sc = (void *)self;
struct uba_attach_args *ua = aux;
sc->sc_iot = ua->ua_iot;
@ -137,5 +137,5 @@ dz_uba_attach(parent, self, aux)
dzrint, sc, &sc->sc_rintrcnt);
uba_reset_establish(dzreset, self);
dzattach(sc);
dzattach(sc, ua->ua_evcnt);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dzvar.h,v 1.8 2000/06/04 02:14:12 matt Exp $ */
/* $NetBSD: dzvar.h,v 1.9 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
* Copyright (c) 1992, 1993
@ -69,7 +69,7 @@ struct dz_softc {
} sc_dz[NDZLINE];
};
void dzattach(struct dz_softc *);
void dzattach(struct dz_softc *, struct evcnt *);
void dzrint(void *);
void dzxint(void *);
void dzreset(struct device *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.3 2000/06/04 06:17:03 matt Exp $ */
/* $NetBSD: if_de.c,v 1.4 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989 Regents of the University of California.
* Copyright (c) 2000 Ludd, University of Lule}, Sweden.
@ -304,7 +304,8 @@ deattach(struct device *parent, struct device *self, void *aux)
uba_intr_establish(ua->ua_icookie, ua->ua_cvec, deintr,
sc, &sc->sc_intrcnt);
uba_reset_establish(dereset, &sc->sc_dev);
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "intr");
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
ifp->if_softc = sc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_qe.c,v 1.41 2000/06/04 06:17:03 matt Exp $ */
/* $NetBSD: if_qe.c,v 1.42 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -350,7 +350,8 @@ qeattach(parent, self, aux)
uba_intr_establish(ua->ua_icookie, ua->ua_cvec, qeintr,
sc, &sc->sc_intrcnt);
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "intr");
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
ifp->if_softc = sc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rl.c,v 1.4 2000/06/04 06:17:04 matt Exp $ */
/* $NetBSD: rl.c,v 1.5 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@ -181,7 +181,8 @@ rlcattach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = ua->ua_dmat;
uba_intr_establish(ua->ua_icookie, ua->ua_cvec,
rlcintr, sc, &sc->sc_intrcnt);
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "intr");
printf("\n");
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: uba.c,v 1.52 2000/06/04 02:14:12 matt Exp $ */
/* $NetBSD: uba.c,v 1.53 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
* Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@ -215,6 +215,7 @@ ubasearch(struct device *parent, struct cfdata *cf, void *aux)
ua.ua_br = br;
ua.ua_cvec = vec;
ua.ua_iaddr = cf->cf_loc[0];
ua.ua_evcnt = NULL;
config_attach(parent, cf, &ua, ubaprint);
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ubavar.h,v 1.29 2000/06/04 06:17:04 matt Exp $ */
/* $NetBSD: ubavar.h,v 1.30 2000/06/05 00:09:18 matt Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -117,7 +117,8 @@ struct uba_reset {
struct uba_attach_args {
bus_space_tag_t ua_iot; /* Tag for this bus I/O-space */
bus_addr_t ua_ioh; /* I/O regs addr */
bus_dma_tag_t ua_dmat;
bus_dma_tag_t ua_dmat; /* DMA tag for this bus'es dma */
struct evcnt *ua_evcnt;
void *ua_icookie; /* Cookie for interrupt establish */
int ua_iaddr; /* Full CSR address of device */
int ua_br; /* IPL this dev interrupted on */

View File

@ -1,4 +1,4 @@
/* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */
/* $NetBSD: uda.c,v 1.37 2000/06/05 00:09:19 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* Copyright (c) 1988 Regents of the University of California.
@ -197,7 +197,8 @@ udaattach(parent, self, aux)
uba_intr_establish(ua->ua_icookie, ua->ua_cvec,
udaintr, sc, &sc->sc_intrcnt);
uba_reset_establish(udareset, &sc->sc_dev);
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt,
sc->sc_dev.dv_xname, "intr");
sc->sc_iot = ua->ua_iot;
sc->sc_iph = ua->ua_ioh;