summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-07-09 21:34:47 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-07-09 21:34:47 +0000
commit3abfc1db126ab14f8c59068f5e51f4bccd733e99 (patch)
tree34b345d2f7f4f4ac6a058424186902c3de8a46d6 /sys/arch/sparc/dev
parentf40501037aac56a7506499e6933066d9d78f7594 (diff)
vm_offset_t -> {v,p}addr_t and vm_size_t -> {v,p}size_t
remove "register" keywords Various cleanups.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/dma.c26
-rw-r--r--sys/arch/sparc/dev/if_ie.c25
-rw-r--r--sys/arch/sparc/dev/isp_sbus.c24
-rw-r--r--sys/arch/sparc/dev/si.c6
-rw-r--r--sys/arch/sparc/dev/xd.c13
-rw-r--r--sys/arch/sparc/dev/xy.c12
6 files changed, 53 insertions, 53 deletions
diff --git a/sys/arch/sparc/dev/dma.c b/sys/arch/sparc/dev/dma.c
index cbbb3be40ea..0ddb4505034 100644
--- a/sys/arch/sparc/dev/dma.c
+++ b/sys/arch/sparc/dev/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.14 1999/02/28 19:12:32 jason Exp $ */
+/* $OpenBSD: dma.c,v 1.15 1999/07/09 21:34:44 art Exp $ */
/* $NetBSD: dma.c,v 1.46 1997/08/27 11:24:16 bouyer Exp $ */
/*
@@ -95,7 +95,7 @@ dmaprint(aux, name)
void *aux;
const char *name;
{
- register struct confargs *ca = aux;
+ struct confargs *ca = aux;
if (name)
printf("[%s at %s]", ca->ca_ra.ra_name, name);
@@ -108,9 +108,9 @@ dmamatch(parent, vcf, aux)
struct device *parent;
void *vcf, *aux;
{
- register struct cfdata *cf = vcf;
- register struct confargs *ca = aux;
- register struct romaux *ra = &ca->ca_ra;
+ struct cfdata *cf = vcf;
+ struct confargs *ca = aux;
+ struct romaux *ra = &ca->ca_ra;
if (strcmp(cf->cf_driver->cd_name, ra->ra_name) &&
strcmp("espdma", ra->ra_name))
@@ -134,7 +134,7 @@ dmaattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- register struct confargs *ca = aux;
+ struct confargs *ca = aux;
struct dma_softc *sc = (void *)self;
#if defined(SUN4C) || defined(SUN4M)
int node;
@@ -378,9 +378,9 @@ ledmamatch(parent, vcf, aux)
struct device *parent;
void *vcf, *aux;
{
- register struct cfdata *cf = vcf;
- register struct confargs *ca = aux;
- register struct romaux *ra = &ca->ca_ra;
+ struct cfdata *cf = vcf;
+ struct confargs *ca = aux;
+ struct romaux *ra = &ca->ca_ra;
if (strcmp(cf->cf_driver->cd_name, ra->ra_name))
return (0);
@@ -465,8 +465,8 @@ dma_setup(sc, addr, len, datain, dmasize)
if (sc->sc_rev == DMAREV_ESC) {
/* DMA ESC chip bug work-around */
- register long bcnt = sc->sc_dmasize;
- register long eaddr = bcnt + (long)*sc->sc_dmaaddr;
+ long bcnt = sc->sc_dmasize;
+ long eaddr = bcnt + (long)*sc->sc_dmaaddr;
if ((eaddr & PGOFSET) != 0)
bcnt = roundup(bcnt, NBPG);
DMACNT(sc) = bcnt;
@@ -594,8 +594,8 @@ espdmaintr(sc)
cpuinfo.cache_flush(*sc->sc_dmaaddr, trans);
if (CPU_ISSUN4M && sc->sc_dvmakaddr)
- dvma_mapout((vm_offset_t)sc->sc_dvmakaddr,
- (vm_offset_t)sc->sc_dvmaaddr, sc->sc_dmasize);
+ dvma_mapout((vaddr_t)sc->sc_dvmakaddr,
+ (vaddr_t)sc->sc_dvmaaddr, sc->sc_dmasize);
*sc->sc_dmalen -= trans;
*sc->sc_dmaaddr += trans;
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index 2e4d444597f..ae348c77598 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.10 1999/04/22 16:57:54 art Exp $ */
+/* $OpenBSD: if_ie.c,v 1.11 1999/07/09 21:34:45 art Exp $ */
/* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */
/*-
@@ -512,7 +512,7 @@ ieattach(parent, self, aux)
struct confargs *ca = aux;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
extern void myetheraddr(u_char *); /* should be elsewhere */
- register struct bootpath *bp;
+ struct bootpath *bp;
int pri = ca->ca_ra.ra_intr[0].int_pri;
/*
@@ -525,7 +525,7 @@ ieattach(parent, self, aux)
case BUS_OBIO:
{
volatile struct ieob *ieo;
- vm_offset_t pa;
+ paddr_t pa;
sc->hard_type = IE_OBIO;
sc->reset_586 = ie_obreset;
@@ -543,11 +543,11 @@ ieattach(parent, self, aux)
*/
#if defined(UVM)
- ie_map = uvm_map_create(pmap_kernel(), (vm_offset_t)IEOB_ADBASE,
- (vm_offset_t)IEOB_ADBASE + sc->sc_msize, 1);
+ ie_map = uvm_map_create(pmap_kernel(), (vaddr_t)IEOB_ADBASE,
+ (vaddr_t)IEOB_ADBASE + sc->sc_msize, 1);
#else
- ie_map = vm_map_create(pmap_kernel(), (vm_offset_t)IEOB_ADBASE,
- (vm_offset_t)IEOB_ADBASE + sc->sc_msize, 1);
+ ie_map = vm_map_create(pmap_kernel(), (vaddr_t)IEOB_ADBASE,
+ (vaddr_t)IEOB_ADBASE + sc->sc_msize, 1);
#endif
if (ie_map == NULL) panic("ie_map");
#if defined(UVM)
@@ -576,10 +576,11 @@ ieattach(parent, self, aux)
* to IEOB_ADBASE to be safe.
*/
- pa = pmap_extract(pmap_kernel(), (vm_offset_t)sc->sc_maddr);
- if (pa == 0) panic("ie pmap_extract");
+ pa = pmap_extract(pmap_kernel(), (vaddr_t)sc->sc_maddr);
+ if (pa == 0)
+ panic("ie pmap_extract");
pmap_enter(pmap_kernel(), trunc_page(IEOB_ADBASE+IE_SCP_ADDR),
- (vm_offset_t)pa | PMAP_NC /*| PMAP_IOC*/,
+ (paddr_t)pa | PMAP_NC /*| PMAP_IOC*/,
VM_PROT_READ | VM_PROT_WRITE, 1);
sc->scp = (volatile struct ie_sys_conf_ptr *)
@@ -732,7 +733,7 @@ ieintr(v)
void *v;
{
struct ie_softc *sc = v;
- register u_short status;
+ u_short status;
status = sc->scb->ie_status;
@@ -1959,7 +1960,7 @@ iestop(sc)
int
ieioctl(ifp, cmd, data)
- register struct ifnet *ifp;
+ struct ifnet *ifp;
u_long cmd;
caddr_t data;
{
diff --git a/sys/arch/sparc/dev/isp_sbus.c b/sys/arch/sparc/dev/isp_sbus.c
index a5ee0dd3140..197ef3d1899 100644
--- a/sys/arch/sparc/dev/isp_sbus.c
+++ b/sys/arch/sparc/dev/isp_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_sbus.c,v 1.7 1999/03/25 22:58:37 mjacob Exp $ */
+/* $OpenBSD: isp_sbus.c,v 1.8 1999/07/09 21:34:45 art Exp $ */
/* release_03_25_99 */
/*
* SBus specific probe and attach routines for Qlogic ISP SCSI adapters.
@@ -82,7 +82,7 @@ struct isp_sbussoftc {
int sbus_node;
int sbus_pri;
struct ispmdvec sbus_mdvec;
- vm_offset_t sbus_kdma_allocs[MAXISPREQUEST];
+ vaddr_t sbus_kdma_allocs[MAXISPREQUEST];
int16_t sbus_poff[_NREG_BLKS];
};
@@ -105,7 +105,7 @@ isp_match(parent, cfarg, aux)
static int oneshot = 1;
#endif
struct confargs *ca = aux;
- register struct romaux *ra = &ca->ca_ra;
+ struct romaux *ra = &ca->ca_ra;
rv = (strcmp(cf->cf_driver->cd_name, ra->ra_name) == 0 ||
strcmp("PTI,ptisp", ra->ra_name) == 0 ||
@@ -300,7 +300,7 @@ isp_sbus_dmasetup(isp, xs, rq, iptrp, optr)
u_int8_t optr;
{
struct isp_sbussoftc *sbc = (struct isp_sbussoftc *) isp;
- vm_offset_t kdvma;
+ vaddr_t kdvma;
int dosleep = (xs->flags & SCSI_NOSLEEP) != 0;
if (xs->datalen == 0) {
@@ -315,17 +315,17 @@ isp_sbus_dmasetup(isp, xs, rq, iptrp, optr)
/* NOTREACHED */
}
if (CPU_ISSUN4M) {
- kdvma = (vm_offset_t)
+ kdvma = (vaddr_t)
kdvma_mapin((caddr_t)xs->data, xs->datalen, dosleep);
- if (kdvma == (vm_offset_t) 0) {
+ if (kdvma == (vaddr_t) 0) {
XS_SETERR(xs, HBA_BOTCH);
return (CMD_COMPLETE);
}
} else {
- kdvma = (vm_offset_t) xs->data;
+ kdvma = (vaddr_t) xs->data;
}
- if (sbc->sbus_kdma_allocs[rq->req_handle - 1] != (vm_offset_t) 0) {
+ if (sbc->sbus_kdma_allocs[rq->req_handle - 1] != (vaddr_t) 0) {
panic("%s: kdma handle already allocated\n", isp->isp_name);
/* NOTREACHED */
}
@@ -348,7 +348,7 @@ isp_sbus_dmateardown(isp, xs, handle)
u_int32_t handle;
{
struct isp_sbussoftc *sbc = (struct isp_sbussoftc *) isp;
- vm_offset_t kdvma;
+ vaddr_t kdvma;
if (xs->flags & SCSI_DATA_IN) {
cpuinfo.cache_flush(xs->data, xs->datalen - xs->resid);
@@ -358,13 +358,13 @@ isp_sbus_dmateardown(isp, xs, handle)
isp->isp_name, handle);
/* NOTREACHED */
}
- if (sbc->sbus_kdma_allocs[handle] == (vm_offset_t) 0) {
+ if (sbc->sbus_kdma_allocs[handle] == (vaddr_t) 0) {
panic("%s: kdma handle not already allocated\n", isp->isp_name);
/* NOTREACHED */
}
kdvma = sbc->sbus_kdma_allocs[handle];
- sbc->sbus_kdma_allocs[handle] = (vm_offset_t) 0;
+ sbc->sbus_kdma_allocs[handle] = (vaddr_t) 0;
if (CPU_ISSUN4M) {
- dvma_mapout(kdvma, (vm_offset_t) xs->data, xs->datalen);
+ dvma_mapout(kdvma, (vaddr_t) xs->data, xs->datalen);
}
}
diff --git a/sys/arch/sparc/dev/si.c b/sys/arch/sparc/dev/si.c
index c057556f08c..b66b07333a0 100644
--- a/sys/arch/sparc/dev/si.c
+++ b/sys/arch/sparc/dev/si.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: si.c,v 1.12 1999/01/11 05:11:56 millert Exp $ */
+/* $OpenBSD: si.c,v 1.13 1999/07/09 21:34:45 art Exp $ */
/* $NetBSD: si.c,v 1.38 1997/08/27 11:24:20 bouyer Exp $ */
/*-
@@ -717,8 +717,8 @@ si_dma_free(ncr_sc)
/* XXX - Should separate allocation and mapping. */
/* Give back the DVMA space. */
- dvma_mapout((vm_offset_t)dh->dh_dvma,
- (vm_offset_t)dh->dh_addr, dh->dh_maplen);
+ dvma_mapout((vaddr_t)dh->dh_dvma, (vaddr_t)dh->dh_addr,
+ dh->dh_maplen);
dh->dh_dvma = 0;
dh->dh_flags = 0;
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c
index dba45d7667a..0cc44398e56 100644
--- a/sys/arch/sparc/dev/xd.c
+++ b/sys/arch/sparc/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.13 1998/10/03 21:18:58 millert Exp $ */
+/* $OpenBSD: xd.c,v 1.14 1999/07/09 21:34:46 art Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
@@ -1710,7 +1710,7 @@ xdc_reset(xdcsc, quiet, blastmode, error, xdsc)
/* fix queues based on "blast-mode" */
for (lcv = 0; lcv < XDC_MAXIOPB; lcv++) {
- register struct xd_iorq *iorq = &xdcsc->reqs[lcv];
+ struct xd_iorq *iorq = &xdcsc->reqs[lcv];
if (XD_STATE(iorq->mode) != XD_SUB_POLL &&
XD_STATE(iorq->mode) != XD_SUB_WAIT &&
@@ -1729,9 +1729,8 @@ xdc_reset(xdcsc, quiet, blastmode, error, xdsc)
iorq->buf->b_flags |= B_ERROR;
iorq->buf->b_resid =
iorq->sectcnt * XDFM_BPS;
- dvma_mapout(
- (vm_offset_t)iorq->dbufbase,
- (vm_offset_t)iorq->buf->b_un.b_addr,
+ dvma_mapout((vaddr_t)iorq->dbufbase,
+ (vaddr_t)iorq->buf->b_un.b_addr,
iorq->buf->b_bcount);
disk_unbusy(&xdcsc->reqs[lcv].xd->sc_dk,
(xdcsc->reqs[lcv].buf->b_bcount -
@@ -1936,8 +1935,8 @@ xdc_remove_iorq(xdcsc)
} else {
bp->b_resid = 0; /* done */
}
- dvma_mapout((vm_offset_t) iorq->dbufbase,
- (vm_offset_t) bp->b_un.b_addr,
+ dvma_mapout((vaddr_t) iorq->dbufbase,
+ (vaddr_t) bp->b_un.b_addr,
bp->b_bcount);
disk_unbusy(&iorq->xd->sc_dk,
(bp->b_bcount - bp->b_resid));
diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c
index 9e17ac34c99..bfc8f5efc8f 100644
--- a/sys/arch/sparc/dev/xy.c
+++ b/sys/arch/sparc/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.12 1999/01/11 05:11:57 millert Exp $ */
+/* $OpenBSD: xy.c,v 1.13 1999/07/09 21:34:46 art Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
@@ -1617,7 +1617,7 @@ xyc_reset(xycsc, quiet, blastmode, error, xysc)
/* fix queues based on "blast-mode" */
for (lcv = 0; lcv < XYC_MAXIOPB; lcv++) {
- register struct xy_iorq *iorq = &xycsc->reqs[lcv];
+ struct xy_iorq *iorq = &xycsc->reqs[lcv];
if (XY_STATE(iorq->mode) != XY_SUB_POLL &&
XY_STATE(iorq->mode) != XY_SUB_WAIT &&
@@ -1635,8 +1635,8 @@ xyc_reset(xycsc, quiet, blastmode, error, xysc)
iorq->buf->b_error = EIO;
iorq->buf->b_flags |= B_ERROR;
iorq->buf->b_resid = iorq->sectcnt * XYFM_BPS;
- dvma_mapout((vm_offset_t)iorq->dbufbase,
- (vm_offset_t)iorq->buf->b_un.b_addr,
+ dvma_mapout((vaddr_t)iorq->dbufbase,
+ (vaddr_t)iorq->buf->b_un.b_addr,
iorq->buf->b_bcount);
iorq->xy->xyq.b_actf = iorq->buf->b_actf;
disk_unbusy(&xycsc->reqs[lcv].xy->sc_dk,
@@ -1813,8 +1813,8 @@ xyc_remove_iorq(xycsc)
} else {
bp->b_resid = 0; /* done */
}
- dvma_mapout((vm_offset_t) iorq->dbufbase,
- (vm_offset_t) bp->b_un.b_addr,
+ dvma_mapout((vaddr_t) iorq->dbufbase,
+ (vaddr_t) bp->b_un.b_addr,
bp->b_bcount);
iorq->xy->xyq.b_actf = bp->b_actf;
disk_unbusy(&iorq->xy->sc_dk,