summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/vax/bi/bi.c4
-rw-r--r--sys/arch/vax/bi/if_ni.c4
-rw-r--r--sys/arch/vax/if/if_de.c6
-rw-r--r--sys/arch/vax/if/if_le.c18
-rw-r--r--sys/arch/vax/if/if_qe.c13
-rw-r--r--sys/arch/vax/if/sgec.c8
-rw-r--r--sys/arch/vax/if/sgecvar.h4
-rw-r--r--sys/arch/vax/include/cpu.h3
-rw-r--r--sys/arch/vax/include/scb.h10
-rw-r--r--sys/arch/vax/include/types.h3
-rw-r--r--sys/arch/vax/include/vsbus.h4
-rw-r--r--sys/arch/vax/qbus/dhu.c16
-rw-r--r--sys/arch/vax/qbus/dz.c5
-rw-r--r--sys/arch/vax/qbus/dzvar.h7
-rw-r--r--sys/arch/vax/qbus/if_de.c5
-rw-r--r--sys/arch/vax/qbus/uba.c6
-rw-r--r--sys/arch/vax/qbus/ubavar.h6
-rw-r--r--sys/arch/vax/qbus/uda.c9
-rw-r--r--sys/arch/vax/uba/uba.c4
-rw-r--r--sys/arch/vax/vax/clock.c13
-rw-r--r--sys/arch/vax/vax/genassym.cf7
-rw-r--r--sys/arch/vax/vax/intvec.s6
-rw-r--r--sys/arch/vax/vax/scb.c6
-rw-r--r--sys/arch/vax/vax/subr.s6
-rw-r--r--sys/arch/vax/vsa/asc_vsbus.c11
-rw-r--r--sys/arch/vax/vsa/dz_ibus.c18
-rw-r--r--sys/arch/vax/vsa/if_le_vsbus.c9
-rw-r--r--sys/arch/vax/vsa/ncr.c9
-rw-r--r--sys/arch/vax/vsa/vsbus.c4
29 files changed, 122 insertions, 102 deletions
diff --git a/sys/arch/vax/bi/bi.c b/sys/arch/vax/bi/bi.c
index be59e866278..dcda8b1f783 100644
--- a/sys/arch/vax/bi/bi.c
+++ b/sys/arch/vax/bi/bi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bi.c,v 1.6 2002/08/09 20:26:44 jsyn Exp $ */
+/* $OpenBSD: bi.c,v 1.7 2004/07/07 23:10:43 deraadt Exp $ */
/* $NetBSD: bi.c,v 1.17 2001/11/13 12:51:34 lukem Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -97,7 +97,7 @@ bi_print(aux, name)
}
printf(" node %d", ba->ba_nodenr);
if (bl->bl_havedriver & DT_VEC)
- printf(" vec %o", ba->ba_ivec & 511);
+ printf(" vec %d", ba->ba_ivec & 511);
#ifdef DEBUG
if (bus_space_read_4(ba->ba_iot, ba->ba_ioh, BIREG_SADR) &&
bus_space_read_4(ba->ba_iot, ba->ba_ioh, BIREG_EADR))
diff --git a/sys/arch/vax/bi/if_ni.c b/sys/arch/vax/bi/if_ni.c
index 7795fa1afe9..34bdafbd4b8 100644
--- a/sys/arch/vax/bi/if_ni.c
+++ b/sys/arch/vax/bi/if_ni.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ni.c,v 1.4 2003/05/11 19:41:12 deraadt Exp $ */
+/* $OpenBSD: if_ni.c,v 1.5 2004/07/07 23:10:43 deraadt Exp $ */
/* $NetBSD: if_ni.c,v 1.15 2002/05/22 16:03:14 wiz Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -470,7 +470,7 @@ retry: WAITREG(NI_PCR, PCR_OWN);
/* Wait for everything to finish */
WAITREG(NI_PSR, PSR_OWN);
- printf("%s: hardware address %s\n", sc->sc_dev.dv_xname,
+ printf("%s: address %s\n", sc->sc_dev.dv_xname,
ether_sprintf(sc->sc_enaddr));
/*
diff --git a/sys/arch/vax/if/if_de.c b/sys/arch/vax/if/if_de.c
index 09ef89e4cde..a6dbe086e1c 100644
--- a/sys/arch/vax/if/if_de.c
+++ b/sys/arch/vax/if/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.13 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: if_de.c,v 1.14 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: if_de.c,v 1.27 1997/04/19 15:02:29 ragge Exp $ */
/*
@@ -215,8 +215,8 @@ deattach(parent, self, aux)
ubarelse((void *)ds->ds_dev.dv_parent, &ds->ds_ubaddr);
bcopy((caddr_t)&ds->ds_pcbb.pcbb2, myaddr, sizeof (myaddr));
- printf("%s: hardware address %s\n", ds->ds_dev.dv_xname,
- ether_sprintf(myaddr));
+ printf("%s: address %s\n", ds->ds_dev.dv_xname,
+ ether_sprintf(myaddr));
ifp->if_ioctl = deioctl;
ifp->if_start = destart;
ds->ds_deuba.iff_flags = UBA_CANTWAIT;
diff --git a/sys/arch/vax/if/if_le.c b/sys/arch/vax/if/if_le.c
index 847b9bad707..e7182e5c5e2 100644
--- a/sys/arch/vax/if/if_le.c
+++ b/sys/arch/vax/if/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.11 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: if_le.c,v 1.12 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: if_le.c,v 1.14 1999/08/14 18:40:23 ragge Exp $ */
/*-
@@ -103,7 +103,8 @@
struct le_softc {
struct am7990_softc sc_am7990; /* Must be first */
- struct evcnt sc_intrcnt;
+ struct evcount sc_intrcnt;
+ int sc_vec;
volatile u_short *sc_rap;
volatile u_short *sc_rdp;
};
@@ -163,7 +164,7 @@ le_ibus_attach(parent, self, aux)
{
struct le_softc *sc = (void *)self;
int *lance_addr;
- int i, vec, br;
+ int i, br;
sc->sc_rdp = (short *)vax_map_physmem(0x20084400, 1);
sc->sc_rap = sc->sc_rdp + 2;
@@ -177,14 +178,15 @@ le_ibus_attach(parent, self, aux)
DELAY(100);
*sc->sc_rdp = LE_C0_INIT|LE_C0_INEA;
DELAY(100000);
- i = scb_vecref(&vec, &br);
- if (i == 0 || vec == 0)
+ i = scb_vecref(&sc->sc_vec, &br);
+ if (i == 0 || sc->sc_vec == 0)
return;
- scb_vecalloc(vec, (void *)am7990_intr, sc,
+ scb_vecalloc(sc->sc_vec, (void *)am7990_intr, sc,
SCB_ISTACK, &sc->sc_intrcnt);
- evcnt_attach(self, "intr", &sc->sc_intrcnt);
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname,
+ (void *)&sc->sc_vec, &evcount_intr);
- printf(": vec %o ipl %x\n%s", vec, br, self->dv_xname);
+ printf(": vec %d ipl %x\n%s", sc->sc_vec, br, self->dv_xname);
/*
* MD functions.
*/
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c
index d418ecaa776..2d43a41c411 100644
--- a/sys/arch/vax/if/if_qe.c
+++ b/sys/arch/vax/if/if_qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qe.c,v 1.17 2003/05/11 19:41:12 deraadt Exp $ */
+/* $OpenBSD: if_qe.c,v 1.18 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -77,7 +77,8 @@ struct qe_cdata {
struct qe_softc {
struct device sc_dev; /* Configuration common part */
- struct evcnt sc_intrcnt; /* Interrupt counting */
+ struct evcount sc_intrcnt; /* Interrupt counting */
+ int sc_cvec;
struct arpcom sc_ac; /* Ethernet common part */
#define sc_if sc_ac.ac_if /* network-visible interface */
bus_space_tag_t sc_iot;
@@ -305,15 +306,17 @@ qeattach(struct device *parent, struct device *self, void *aux)
sc->sc_ac.ac_enaddr[i] = QE_RCSR(i * 2) & 0xff;
QE_WCSR(QE_CSR_VECTOR, sc->sc_intvec | 1);
- printf("\n%s: %s, hardware address %s\n", sc->sc_dev.dv_xname,
- QE_RCSR(QE_CSR_VECTOR) & 1 ? "delqa":"deqna",
+ printf(": %s, address %s\n",
+ QE_RCSR(QE_CSR_VECTOR) & 1 ? "delqa" : "deqna",
ether_sprintf(sc->sc_ac.ac_enaddr));
QE_WCSR(QE_CSR_VECTOR, QE_RCSR(QE_CSR_VECTOR) & ~1); /* ??? */
uba_intr_establish(ua->ua_icookie, ua->ua_cvec, qeintr,
sc, &sc->sc_intrcnt);
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
+ sc->sc_cvec = ua->ua_cvec;
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_cvec, &evcount_intr);
strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, sizeof ifp->if_xname);
ifp->if_softc = sc;
diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c
index 292bcd12f02..7d4c1d7ec97 100644
--- a/sys/arch/vax/if/sgec.c
+++ b/sys/arch/vax/if/sgec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgec.c,v 1.6 2003/05/11 19:41:12 deraadt Exp $ */
+/* $OpenBSD: sgec.c,v 1.7 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -175,7 +175,8 @@ sgec_attach(sc)
/* For vmstat -i
*/
- evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_intvec, &evcount_intr);
/*
* Create ring loops of the buffer chains.
@@ -209,8 +210,7 @@ sgec_attach(sc)
if_attach(ifp);
ether_ifattach(ifp);
- printf("\n%s: hardware address %s\n", sc->sc_dev.dv_xname,
- ether_sprintf(sc->sc_ac.ac_enaddr));
+ printf(": address %s\n", ether_sprintf(sc->sc_ac.ac_enaddr));
return;
/*
diff --git a/sys/arch/vax/if/sgecvar.h b/sys/arch/vax/if/sgecvar.h
index a7bb0afc389..268d2310102 100644
--- a/sys/arch/vax/if/sgecvar.h
+++ b/sys/arch/vax/if/sgecvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgecvar.h,v 1.3 2002/03/14 01:26:48 millert Exp $ */
+/* $OpenBSD: sgecvar.h,v 1.4 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: sgecvar.h,v 1.2 2000/06/04 02:14:14 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -44,7 +44,7 @@ struct ze_cdata {
struct ze_softc {
struct device sc_dev; /* Configuration common part */
- struct evcnt sc_intrcnt; /* Interrupt counters */
+ struct evcount sc_intrcnt; /* Interrupt counters */
struct arpcom sc_ac; /* Ethernet common part */
#define sc_if sc_ac.ac_if /* network-visible interface */
bus_space_tag_t sc_iot;
diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h
index a0df493ff3e..6a536162973 100644
--- a/sys/arch/vax/include/cpu.h
+++ b/sys/arch/vax/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.16 2004/06/13 21:49:21 niklas Exp $ */
+/* $OpenBSD: cpu.h,v 1.17 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */
/*
@@ -37,6 +37,7 @@
#include <sys/cdefs.h>
#include <sys/device.h>
+#include <sys/evcount.h>
#include <machine/mtpr.h>
#include <machine/pte.h>
diff --git a/sys/arch/vax/include/scb.h b/sys/arch/vax/include/scb.h
index c870085725f..82b09d6ec22 100644
--- a/sys/arch/vax/include/scb.h
+++ b/sys/arch/vax/include/scb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scb.h,v 1.6 2001/08/25 13:33:36 hugh Exp $ */
+/* $OpenBSD: scb.h,v 1.7 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: scb.h,v 1.11 2000/07/10 09:14:34 ragge Exp $ */
/*
@@ -113,7 +113,7 @@ struct scb {
/*
* This struct is used when setting up interrupt vectors dynamically.
* It put a opaque 32 bit quanity on the stack and also has a placeholder
- * for evcnt structure.
+ * for evcount structure.
*/
struct ivec_dsp {
char pushr; /* pushr */
@@ -123,19 +123,19 @@ struct ivec_dsp {
long displacement;
void (*hoppaddr)(void *);
void *pushlarg;
- struct evcnt *ev;
+ struct evcount *ev;
};
#ifdef _KERNEL
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 struct evcount devipl_intrcnts[4]; /* IPL 2[0123] */
extern paddr_t scb_init (paddr_t);
extern int scb_vecref (int *, int *);
extern void scb_fake (int, int);
-extern void scb_vecalloc (int, void(*)(void *), void *, int, struct evcnt *);
+extern void scb_vecalloc (int, void(*)(void *), void *, int, struct evcount *);
#endif /* _KERNEL */
#endif /* _VAX_SCB_H */
diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h
index b465a925475..8d16a7246b8 100644
--- a/sys/arch/vax/include/types.h
+++ b/sys/arch/vax/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.12 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: types.h,v 1.13 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: types.h,v 1.14 1998/08/13 02:10:49 eeh Exp $ */
/*-
@@ -74,5 +74,6 @@ typedef unsigned long long u_int64_t;
typedef int32_t register_t;
#define __HAVE_DEVICE_REGISTER
+#define __HAVE_EVCOUNT
#endif /* _MACHTYPES_H_ */
diff --git a/sys/arch/vax/include/vsbus.h b/sys/arch/vax/include/vsbus.h
index 91d58a21ca1..2a05affaace 100644
--- a/sys/arch/vax/include/vsbus.h
+++ b/sys/arch/vax/include/vsbus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsbus.h,v 1.7 2002/03/14 01:26:48 millert Exp $ */
+/* $OpenBSD: vsbus.h,v 1.8 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: vsbus.h,v 1.13 2000/06/25 16:00:46 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -92,7 +92,7 @@ struct vsbus_attach_args {
void *va_vecarg; /* Interrupt routine argument */
short va_br; /* Interrupt level */
- short va_cvec; /* Interrupt vector address */
+ int va_cvec; /* Interrupt vector address */
u_char va_maskno; /* Interrupt vector in mask */
vaddr_t va_dmaaddr; /* DMA area address */
vsize_t va_dmasize; /* DMA area size */
diff --git a/sys/arch/vax/qbus/dhu.c b/sys/arch/vax/qbus/dhu.c
index 0ab774c002f..87884c4712e 100644
--- a/sys/arch/vax/qbus/dhu.c
+++ b/sys/arch/vax/qbus/dhu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhu.c,v 1.10 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: dhu.c,v 1.11 2004/07/07 23:10:45 deraadt Exp $ */
/* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */
/*
* Copyright (c) 2003, Hugh Graham.
@@ -60,8 +60,9 @@
struct dhu_softc {
struct device sc_dev; /* Device struct used by config */
- struct evcnt sc_rintrcnt; /* Interrupt statistics */
- struct evcnt sc_tintrcnt; /* Interrupt statistics */
+ struct evcount sc_rintrcnt; /* Interrupt statistics */
+ struct evcount sc_tintrcnt; /* Interrupt statistics */
+ int sc_rcvec, sc_tcvec;
int sc_type; /* controller type, DHU or DHV */
int sc_lines; /* number of lines */
bus_space_tag_t sc_iot;
@@ -258,8 +259,13 @@ 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);
+
+ sc->sc_rcvec = ua->ua_cvec;
+ evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_rcvec, &evcount_intr);
+ sc->sc_tcvec = ua->ua_cvec + 4;
+ evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_tcvec, &evcount_intr);
}
/* Receiver Interrupt */
diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c
index 589a85c1e84..c80204fac20 100644
--- a/sys/arch/vax/qbus/dz.c
+++ b/sys/arch/vax/qbus/dz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dz.c,v 1.10 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: dz.c,v 1.11 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
@@ -146,9 +146,6 @@ 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);
-
/* Alas no interrupt on modem bit changes, so we manually scan */
if (dz_timer == 0) {
diff --git a/sys/arch/vax/qbus/dzvar.h b/sys/arch/vax/qbus/dzvar.h
index a01541fde41..fb99a6a577a 100644
--- a/sys/arch/vax/qbus/dzvar.h
+++ b/sys/arch/vax/qbus/dzvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dzvar.h,v 1.5 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: dzvar.h,v 1.6 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: dzvar.h,v 1.8 2000/06/04 02:14:12 matt Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
@@ -47,8 +47,9 @@
struct dz_softc {
struct device sc_dev; /* Autoconf blaha */
- struct evcnt sc_rintrcnt; /* recevive interrupt counts */
- struct evcnt sc_tintrcnt; /* transmit interrupt counts */
+ struct evcount sc_rintrcnt; /* recevive interrupt counts */
+ struct evcount sc_tintrcnt; /* transmit interrupt counts */
+ int sc_rcvec, sc_tcvec;
struct dz_regs sc_dr; /* reg pointers */
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
diff --git a/sys/arch/vax/qbus/if_de.c b/sys/arch/vax/qbus/if_de.c
index ca50876ef28..16fb339aed2 100644
--- a/sys/arch/vax/qbus/if_de.c
+++ b/sys/arch/vax/qbus/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.3 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: if_de.c,v 1.4 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: if_de.c,v 1.11 2001/11/13 07:11:24 lukem Exp $ */
/*
@@ -226,8 +226,7 @@ deattach(struct device *parent, struct device *self, void *aux)
dewait(sc, "read addr ");
bcopy((caddr_t)&sc->sc_dedata->dc_pcbb.pcbb2, myaddr, sizeof (myaddr));
- printf("\n%s: %s, hardware address %s\n", sc->sc_dev.dv_xname, c,
- ether_sprintf(myaddr));
+ printf(": %s, address %s\n", c, ether_sprintf(myaddr));
uba_intr_establish(ua->ua_icookie, ua->ua_cvec, deintr, sc,
&sc->sc_intrcnt);
diff --git a/sys/arch/vax/qbus/uba.c b/sys/arch/vax/qbus/uba.c
index e426ea931be..f459348ed14 100644
--- a/sys/arch/vax/qbus/uba.c
+++ b/sys/arch/vax/qbus/uba.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uba.c,v 1.9 2004/05/04 16:59:31 grange Exp $ */
+/* $OpenBSD: uba.c,v 1.10 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: uba.c,v 1.57 2001/04/26 19:16:07 ragge Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
@@ -296,7 +296,7 @@ ubaprint(void *aux, const char *uba)
{
struct uba_attach_args *ua = aux;
- printf(" csr %o vec %o ipl %x", ua->ua_iaddr,
+ printf(" csr %o vec %d ipl %x", ua->ua_iaddr,
ua->ua_cvec & 511, ua->ua_br);
return UNCONF;
}
@@ -310,7 +310,7 @@ uba_intr_establish(icookie, vec, ifunc, iarg, ev)
int vec;
void (*ifunc)(void *iarg);
void *iarg;
- struct evcnt *ev;
+ struct evcount *ev;
{
scb_vecalloc(vec, ifunc, iarg, SCB_ISTACK, ev);
}
diff --git a/sys/arch/vax/qbus/ubavar.h b/sys/arch/vax/qbus/ubavar.h
index ac84d51ce07..cca630c9dd2 100644
--- a/sys/arch/vax/qbus/ubavar.h
+++ b/sys/arch/vax/qbus/ubavar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubavar.h,v 1.5 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: ubavar.h,v 1.6 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: ubavar.h,v 1.31 2001/04/26 19:16:07 ragge Exp $ */
/*
@@ -66,7 +66,7 @@
*/
struct uba_softc {
struct device uh_dev; /* Device struct, autoconfig */
- struct evcnt uh_intrcnt; /* interrupt counting */
+ struct evcount uh_intrcnt; /* interrupt counting */
SIMPLEQ_HEAD(, uba_unit) uh_resq; /* resource wait chain */
SIMPLEQ_HEAD(, uba_reset) uh_resetq; /* ubareset queue */
int uh_lastiv; /* last free interrupt vector */
@@ -150,7 +150,7 @@ struct ubinfo {
#define ubdevreg(addr) ((addr) & 017777)
#ifdef _KERNEL
-void uba_intr_establish(void *, int, void (*)(void *), void *, struct evcnt *);
+void uba_intr_establish(void *, int, void (*)(void *), void *, struct evcount *);
void uba_reset_establish(void (*)(struct device *), struct device *);
void uba_attach(struct uba_softc *, unsigned long);
void uba_enqueue(struct uba_unit *);
diff --git a/sys/arch/vax/qbus/uda.c b/sys/arch/vax/qbus/uda.c
index c30f2d8ec4a..ae22ee8ffce 100644
--- a/sys/arch/vax/qbus/uda.c
+++ b/sys/arch/vax/qbus/uda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uda.c,v 1.4 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: uda.c,v 1.5 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -59,7 +59,8 @@
*/
struct uda_softc {
struct device sc_dev; /* Autoconfig info */
- struct evcnt sc_intrcnt; /* Interrupt counting */
+ struct evcount sc_intrcnt; /* Interrupt counting */
+ int sc_cvec;
struct uba_unit sc_unit; /* Struct common for UBA to communicate */
struct mscp_pack *sc_uuda; /* Unibus address of uda struct */
struct mscp_pack sc_uda; /* Struct for uda communication */
@@ -198,7 +199,9 @@ 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);
+ sc->sc_cvec = ua->ua_cvec;
+ evcount_attach(&sc->sc_intrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_cvec, &evcount_intr);
sc->sc_iot = ua->ua_iot;
sc->sc_iph = ua->ua_ioh;
diff --git a/sys/arch/vax/uba/uba.c b/sys/arch/vax/uba/uba.c
index 05db6016877..b63f49547e2 100644
--- a/sys/arch/vax/uba/uba.c
+++ b/sys/arch/vax/uba/uba.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uba.c,v 1.19 2004/05/04 16:59:31 grange Exp $ */
+/* $OpenBSD: uba.c,v 1.20 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: uba.c,v 1.43 2000/01/24 02:40:36 matt Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
@@ -917,7 +917,7 @@ ubaprint(aux, uba)
{
struct uba_attach_args *ua = aux;
- printf(" csr %o vec %o ipl %x", ua->ua_iaddr,
+ printf(" csr %o vec %d ipl %x", ua->ua_iaddr,
ua->ua_cvec & 511, ua->ua_br);
return UNCONF;
}
diff --git a/sys/arch/vax/vax/clock.c b/sys/arch/vax/vax/clock.c
index 3cf86f30343..6f1919d7a0c 100644
--- a/sys/arch/vax/vax/clock.c
+++ b/sys/arch/vax/vax/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.17 2004/04/21 18:39:57 mickey Exp $ */
+/* $OpenBSD: clock.c,v 1.18 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: clock.c,v 1.35 2000/06/04 06:16:58 matt Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
@@ -47,7 +47,7 @@
int yeartonum(int);
int numtoyear(int);
-struct evcnt clock_intrcnt;
+struct evcount clock_intrcnt;
/*
* microtime() should return number of usecs in struct timeval.
@@ -176,16 +176,9 @@ delay(i)
void
cpu_initclocks()
{
- /*
- * The current evcnt mechanism sucks, so provide a struct
- * device for vmstat's sake, until it can be replaced.
- */
- static struct device clockdev;
- strlcpy(clockdev.dv_xname, "clock", sizeof clockdev.dv_xname);
-
mtpr(-10000, PR_NICR); /* Load in count register */
mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */
- evcnt_attach(&clockdev, "intr", &clock_intrcnt);
+ evcount_attach(&clock_intrcnt, "clock", NULL, &evcount_intr);
}
/*
diff --git a/sys/arch/vax/vax/genassym.cf b/sys/arch/vax/vax/genassym.cf
index 209fb80ecd1..0ad893add17 100644
--- a/sys/arch/vax/vax/genassym.cf
+++ b/sys/arch/vax/vax/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.5 2004/06/13 21:49:22 niklas Exp $
+# $OpenBSD: genassym.cf,v 1.6 2004/07/07 23:10:46 deraadt Exp $
# $NetBSD: genassym.cf,v 1.10 1999/11/19 22:09:55 ragge Exp $
#
# Copyright (c) 1997 Ludd, University of Lule}, Sweden.
@@ -35,6 +35,7 @@ include <sys/param.h>
include <sys/proc.h>
include <sys/errno.h>
include <sys/syscall.h>
+include <sys/evcount.h>
include <net/netisr.h>
@@ -114,8 +115,8 @@ export USPACE
export EFAULT
export ENAMETOOLONG
-struct evcnt
-member ev_count
+struct evcount
+member ec_count
export SYS_sigreturn
export SYS_exit
diff --git a/sys/arch/vax/vax/intvec.s b/sys/arch/vax/vax/intvec.s
index 8a4f22f568d..9b9765013aa 100644
--- a/sys/arch/vax/vax/intvec.s
+++ b/sys/arch/vax/vax/intvec.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: intvec.s,v 1.18 2004/04/18 00:25:22 mickey Exp $ */
+/* $OpenBSD: intvec.s,v 1.19 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: intvec.s,v 1.39 1999/06/28 08:20:48 itojun Exp $ */
/*
@@ -302,8 +302,8 @@ ENTRY(netint)
.globl hardclock
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
+ incl _clock_intrcnt+EC_COUNT # count the number of clock interrupts
+ adwc $0,_clock_intrcnt+EC_COUNT+4
#ifdef VAX46
cmpl _vax_boardtype,$VAX_BTYP_46
bneq 1f
diff --git a/sys/arch/vax/vax/scb.c b/sys/arch/vax/vax/scb.c
index b8a627efe51..c8260484898 100644
--- a/sys/arch/vax/vax/scb.c
+++ b/sys/arch/vax/vax/scb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scb.c,v 1.4 2002/03/14 01:26:49 millert Exp $ */
+/* $OpenBSD: scb.c,v 1.5 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: scb.c,v 1.12 2000/06/04 06:16:59 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
@@ -105,7 +105,7 @@ scb_stray(void *arg)
ipl = mfpr(PR_IPL);
if (cold == 0)
- printf("stray interrupt: vector 0x%x, ipl %d\n", vector, ipl);
+ printf("stray interrupt: vector %d, ipl %d\n", vector, ipl);
else {
struct icallsframe *icf = (void *) __builtin_frame_address(0);
@@ -158,7 +158,7 @@ scb_vecalloc(vecno, func, arg, stack, ev)
void (*func)(void *);
void *arg;
int stack;
- struct evcnt *ev;
+ struct evcount *ev;
{
struct ivec_dsp *dsp = &scb_vec[vecno / 4];
dsp->hoppaddr = func;
diff --git a/sys/arch/vax/vax/subr.s b/sys/arch/vax/vax/subr.s
index 0efb63df499..bc7bb9c9e63 100644
--- a/sys/arch/vax/vax/subr.s
+++ b/sys/arch/vax/vax/subr.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.s,v 1.20 2004/06/13 21:49:22 niklas Exp $ */
+/* $OpenBSD: subr.s,v 1.21 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: subr.s,v 1.32 1999/03/25 00:41:48 mrg Exp $ */
/*
@@ -138,8 +138,8 @@ _cmn_idsptch:
movl (sp)+,r0 # get pointer to idspvec
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
+ incl EC_COUNT(r1) # increment low longword
+ adwc $0,EC_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
diff --git a/sys/arch/vax/vsa/asc_vsbus.c b/sys/arch/vax/vsa/asc_vsbus.c
index 4b934afa8cd..e8989974973 100644
--- a/sys/arch/vax/vsa/asc_vsbus.c
+++ b/sys/arch/vax/vsa/asc_vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc_vsbus.c,v 1.6 2003/02/11 19:20:26 mickey Exp $ */
+/* $OpenBSD: asc_vsbus.c,v 1.7 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: asc_vsbus.c,v 1.22 2001/02/04 20:36:32 ragge Exp $ */
/*-
@@ -70,7 +70,8 @@
struct asc_vsbus_softc {
struct ncr53c9x_softc sc_ncr53c9x; /* Must be first */
- struct evcnt sc_intrcnt; /* count interrupts */
+ struct evcount sc_intrcnt; /* count interrupts */
+ int sc_cvec; /* vector */
bus_space_tag_t sc_bst; /* bus space tag */
bus_space_handle_t sc_bsh; /* bus space handle */
bus_space_handle_t sc_dirh; /* scsi direction handle */
@@ -285,7 +286,9 @@ 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);
+ asc->sc_cvec = va->va_cvec;
+ evcount_attach(&asc->sc_intrcnt, self->dv_xname,
+ (void *)&asc->sc_cvec, &evcount_intr);
/*
* XXX More of this should be in ncr53c9x_attach(), but
@@ -319,8 +322,6 @@ asc_vsbus_attach(struct device *parent, struct device *self, void *aux)
sc->sc_minsync = (1000 / sc->sc_freq);
sc->sc_maxxfer = 64 * 1024;
- printf("\n%s", self->dv_xname); /* Pretty print */
-
/* Do the common parts of attachment. */
ncr53c9x_attach(sc, &asc_vsbus_ops, &asc_vsbus_dev);
}
diff --git a/sys/arch/vax/vsa/dz_ibus.c b/sys/arch/vax/vsa/dz_ibus.c
index 9b8d9cce23f..11ffbf38976 100644
--- a/sys/arch/vax/vsa/dz_ibus.c
+++ b/sys/arch/vax/vsa/dz_ibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dz_ibus.c,v 1.11 2002/03/14 03:16:02 millert Exp $ */
+/* $OpenBSD: dz_ibus.c,v 1.12 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: dz_ibus.c,v 1.15 1999/08/27 17:50:42 ragge Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
@@ -99,14 +99,14 @@ dz_print(void *aux, const char *name)
#if NDZKBD > 0 || NDZMS > 0
struct dz_attach_args *dz_args = aux;
if (name == NULL) {
- printf (" line %d", dz_args->line);
+ printf(" line %d", dz_args->line);
if (dz_args->hwflags & DZ_HWFLAG_CONSOLE)
- printf (" (console)");
+ printf(" (console)");
}
return (QUIET);
#else
if (name)
- printf ("lkc at %s", name);
+ printf("lkc at %s", name);
return (UNCONF);
#endif
#endif
@@ -185,8 +185,14 @@ dz_vsbus_attach(parent, self, aux)
&sc->sc_tintrcnt);
scb_vecalloc(va->va_cvec - 4, dzrint, sc, SCB_ISTACK,
&sc->sc_rintrcnt);
-
- printf("\n%s: 4 lines", self->dv_xname);
+ sc->sc_rcvec = va->va_cvec;
+ evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_rcvec, &evcount_intr);
+ sc->sc_tcvec = va->va_cvec - 4;
+ evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname,
+ (void *)&sc->sc_tcvec, &evcount_intr);
+
+ printf(": 4 lines");
dzattach(sc);
diff --git a/sys/arch/vax/vsa/if_le_vsbus.c b/sys/arch/vax/vsa/if_le_vsbus.c
index a45304038c3..cf4c7af3c8f 100644
--- a/sys/arch/vax/vsa/if_le_vsbus.c
+++ b/sys/arch/vax/vsa/if_le_vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_vsbus.c,v 1.8 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: if_le_vsbus.c,v 1.9 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: if_le_vsbus.c,v 1.10 2000/06/29 07:14:18 mrg Exp $ */
/*-
@@ -101,7 +101,7 @@
struct le_softc {
struct am7990_softc sc_am7990; /* Must be first */
- struct evcnt sc_intrcnt;
+ struct evcount sc_intrcnt;
bus_dmamap_t sc_dm;
volatile u_short *sc_rap;
volatile u_short *sc_rdp;
@@ -209,6 +209,7 @@ le_vsbus_attach(parent, self, aux)
bus_dma_segment_t seg;
int *lance_addr;
int i, err, rseg;
+ static int cvec;
sc->sc_rdp = (short *)vax_map_physmem(NI_BASE, 1);
sc->sc_rap = sc->sc_rdp + 2;
@@ -222,7 +223,9 @@ 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);
+ cvec = va->va_cvec;
+ evcount_attach(&sc->sc_intrcnt, self->dv_xname,
+ (void *)&cvec, &evcount_intr);
/*
* Allocate a (DMA-safe) block for all descriptors and buffers.
diff --git a/sys/arch/vax/vsa/ncr.c b/sys/arch/vax/vsa/ncr.c
index 44cf132af4d..ee5e344cd50 100644
--- a/sys/arch/vax/vsa/ncr.c
+++ b/sys/arch/vax/vsa/ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr.c,v 1.13 2002/06/12 12:29:15 hugh Exp $ */
+/* $OpenBSD: ncr.c,v 1.14 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: ncr.c,v 1.32 2000/06/25 16:00:43 ragge Exp $ */
/*-
@@ -90,7 +90,8 @@ struct si_dma_handle {
struct si_softc {
struct ncr5380_softc ncr_sc;
- struct evcnt ncr_intrcnt;
+ struct evcount ncr_intrcnt;
+ int ncr_cvec;
caddr_t ncr_addr;
int ncr_off;
int ncr_dmaaddr;
@@ -184,7 +185,9 @@ si_attach(parent, self, aux)
/* enable interrupts on vsbus too */
scb_vecalloc(va->va_cvec, (void (*)(void *)) ncr5380_intr, sc,
SCB_ISTACK, &sc->ncr_intrcnt);
- evcnt_attach(self, "intr", &sc->ncr_intrcnt);
+ sc->ncr_cvec = va->va_cvec;
+ evcount_attach(&sc->ncr_intrcnt, self->dv_xname,
+ (void *)&sc->ncr_cvec, &evcount_intr);
/*
* DMA area mapin.
diff --git a/sys/arch/vax/vsa/vsbus.c b/sys/arch/vax/vsa/vsbus.c
index 9b9dafe2aa6..5d9e57c6d18 100644
--- a/sys/arch/vax/vsa/vsbus.c
+++ b/sys/arch/vax/vsa/vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsbus.c,v 1.14 2004/05/04 16:59:31 grange Exp $ */
+/* $OpenBSD: vsbus.c,v 1.15 2004/07/07 23:10:46 deraadt Exp $ */
/* $NetBSD: vsbus.c,v 1.29 2000/06/29 07:14:37 mrg Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
@@ -113,7 +113,7 @@ vsbus_print(aux, name)
{
struct vsbus_attach_args *va = aux;
- printf(" csr 0x%lx vec 0x%x ipl %x maskbit %d", va->va_paddr,
+ printf(" csr 0x%lx vec %d ipl %x maskbit %d", va->va_paddr,
va->va_cvec & 511, va->va_br, va->va_maskno - 1);
return(UNCONF);
}