summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-12-20 00:34:33 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-12-20 00:34:33 +0000
commit7e45482dd1e79a08bc2e66e4619a4ade6c158207 (patch)
treed7a453b68a67035c8c55bb918ba95ab09b06f861 /sys/arch/mvme68k
parenta06160fcc491c92193f68f0a9859d611a7996aa1 (diff)
Passl -Wformat. Fix some blatant -Wuninitialized errors as well.
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r--sys/arch/mvme68k/dev/cl.c10
-rw-r--r--sys/arch/mvme68k/dev/sbic.c8
-rw-r--r--sys/arch/mvme68k/dev/ssh.c18
-rw-r--r--sys/arch/mvme68k/dev/vme.c24
-rw-r--r--sys/arch/mvme68k/dev/vmel.c8
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c9
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c6
7 files changed, 48 insertions, 35 deletions
diff --git a/sys/arch/mvme68k/dev/cl.c b/sys/arch/mvme68k/dev/cl.c
index 85e710f2af1..059168a6876 100644
--- a/sys/arch/mvme68k/dev/cl.c
+++ b/sys/arch/mvme68k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.32 2003/10/03 16:44:50 miod Exp $ */
+/* $OpenBSD: cl.c,v 1.33 2003/12/20 00:34:28 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -1018,6 +1018,7 @@ clcngetc(dev)
u_char ier_old = 0xff;
struct clreg *cl_reg = cl_cons.cl_vaddr;
volatile struct pcctworeg *pcc2_base = cl_cons.pcctwoaddr;
+
cl_reg->cl_car = 0;
if (!(cl_reg->cl_ier & 0x08)) {
ier_old = cl_reg->cl_ier;
@@ -1571,7 +1572,7 @@ cl_txintr(arg)
pbuffer = sc->sc_cl[channel].tx[nbuf];
resid = tp->t_outq.c_cc;
cnt = min (CL_BUFSIZE,resid);
- log(LOG_WARNING, "cl_txintr: resid %x cnt %x pbuf %x\n",
+ log(LOG_WARNING, "cl_txintr: resid %x cnt %x pbuf %p\n",
resid, cnt, pbuffer);
if (cnt != 0) {
cnt = q_to_b(&tp->t_outq, pbuffer, cnt);
@@ -1919,6 +1920,7 @@ cl_dumpport(channel)
rcor = cl_reg->cl_rcor;
tbpr = cl_reg->cl_tbpr;
rpilr = cl_reg->cl_rpilr;
+ rir = cl_reg->cl_rir;
ier = cl_reg->cl_ier;
ccr = cl_reg->cl_ccr;
tcor = cl_reg->cl_tcor;
@@ -1977,11 +1979,11 @@ cl_dumpport(channel)
tpr, csr, rts, dtr);
printf("rtprl %x rtprh %x\n",
rtprl, rtprh);
- printf("rxcnt %x txcnt %x\n",
+ printf("rxcnt %lx txcnt %lx\n",
sc->sc_cl[channel].rxcnt, sc->sc_cl[channel].txcnt);
printf("dmabsts %x, tcbadru %x, tcbadrl %x, rcbadru %x, rcbadrl %x,\n",
dmabsts, tcbadru, tcbadrl, rcbadru, rcbadrl );
- printf("parbadru %x, parbadrl %x, parbcnt %x, parbsts %x\n",
+ printf("parbadru %p, parbadrl %p, parbcnt %p, parbsts %p\n",
parbadru, parbadrl, parbcnt, parbsts);
printf("arbadru %x, arbadrl %x, arbcnt %x, arbsts %x\n",
arbadru, arbadrl, arbcnt, arbsts);
diff --git a/sys/arch/mvme68k/dev/sbic.c b/sys/arch/mvme68k/dev/sbic.c
index ec350415b07..7090dd5d764 100644
--- a/sys/arch/mvme68k/dev/sbic.c
+++ b/sys/arch/mvme68k/dev/sbic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbic.c,v 1.14 2003/11/03 06:54:25 david Exp $ */
+/* $OpenBSD: sbic.c,v 1.15 2003/12/20 00:34:28 miod Exp $ */
/* $NetBSD: sbic.c,v 1.2 1996/04/23 16:32:54 chuck Exp $ */
/*
@@ -1605,7 +1605,7 @@ sbicgo(dev, xs)
count = acb->sc_kv.dc_count;
if ( count && ((char *)kvtop((vaddr_t)addr) != acb->sc_pa.dc_addr) ) {
- printf("sbic: DMA buffer mapping changed %x->%x\n",
+ printf("sbic: DMA buffer mapping changed %p->%lx\n",
acb->sc_pa.dc_addr, kvtop((vaddr_t)addr));
#ifdef DDB
Debugger();
@@ -1748,7 +1748,7 @@ sbicpoll(dev)
{
sbic_regmap_p regs = dev->sc_sbicp;
u_char asr,
- csr;
+ csr = 0;
int i;
/*
@@ -2513,7 +2513,7 @@ sbicnextstate(dev, csr, asr)
}
if ( acb == NULL ) {
- printf("%s: reselect %s targ %d not in nexus_list %x\n",
+ printf("%s: reselect %s targ %d not in nexus_list %p\n",
dev->sc_dev.dv_xname,
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY", newtarget,
&dev->nexus_list.tqh_first);
diff --git a/sys/arch/mvme68k/dev/ssh.c b/sys/arch/mvme68k/dev/ssh.c
index 9f140983bde..7e351835d56 100644
--- a/sys/arch/mvme68k/dev/ssh.c
+++ b/sys/arch/mvme68k/dev/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.6 2003/09/22 21:39:39 miod Exp $ */
+/* $OpenBSD: ssh.c,v 1.7 2003/12/20 00:34:28 miod Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -948,7 +948,7 @@ ssh_checkintr(sc, istat, dstat, sstat0, status)
*((long *)&rp->ssh_dcmd));
#endif
if ((rp->ssh_sbcl & SSH_REQ) == 0) {
- printf ("Phase mismatch: REQ not asserted! %02x dsp %x\n",
+ printf ("Phase mismatch: REQ not asserted! %02x dsp %lx\n",
rp->ssh_sbcl, rp->ssh_dsp);
#ifdef DEBUG
Debugger();
@@ -1047,7 +1047,7 @@ ssh_checkintr(sc, istat, dstat, sstat0, status)
int n = rp->ssh_temp - sc->sc_scriptspa;
if (acb->iob_curlen && acb->iob_curlen != acb->ds.chain[0].datalen)
- printf("%s: iob_curbuf/len already set? n %x iob %x/%x chain[0] %x/%x\n",
+ printf("%s: iob_curbuf/len already set? n %x iob %lx/%lx chain[0] %p/%lx\n",
sc->sc_dev.dv_xname, n, acb->iob_curbuf, acb->iob_curlen,
acb->ds.chain[0].databuf, acb->ds.chain[0].datalen);
if (n < Ent_datain)
@@ -1184,7 +1184,7 @@ ssh_checkintr(sc, istat, dstat, sstat0, status)
break;
}
if (acb == NULL) {
- printf("%s: target ID %02x reselect nexus_list %x\n",
+ printf("%s: target ID %02x reselect nexus_list %p\n",
sc->sc_dev.dv_xname, reselid,
sc->nexus_list.tqh_first);
panic("unable to find reselecting device");
@@ -1252,7 +1252,7 @@ ssh_checkintr(sc, istat, dstat, sstat0, status)
if (sstat0 == 0 && dstat & SSH_DSTAT_SIR) {
dma_cachectl (&acb->stat[0], 1);
dma_cachectl (&acb->msg[0], 1);
- printf ("SSH interrupt: %x sts %x msg %x %x sbcl %x\n",
+ printf ("SSH interrupt: %lx sts %x msg %x %x sbcl %x\n",
rp->ssh_dsps, acb->stat[0], acb->msg[0], acb->msg[1],
rp->ssh_sbcl);
sshreset (sc);
@@ -1272,12 +1272,12 @@ ssh_checkintr(sc, istat, dstat, sstat0, status)
* then panics.
* XXXX need to clean this up to print out the info, reset, and continue
*/
- printf ("sshchkintr: target %x ds %x\n", target, &acb->ds);
- printf ("scripts %x ds %x rp %x dsp %x dcmd %x\n", sc->sc_scriptspa,
+ printf ("sshchkintr: target %x ds %p\n", target, &acb->ds);
+ printf ("scripts %lx ds %lx rp %lx dsp %lx dcmd %lx\n", sc->sc_scriptspa,
kvtop((vaddr_t)&acb->ds), kvtop((vaddr_t)rp), rp->ssh_dsp,
*((long *)&rp->ssh_dcmd));
- printf ("sshchkintr: istat %x dstat %x sstat0 %x dsps %x "
- "dsa %x sbcl %x sts %x msg %x %x sfbr %x\n",
+ printf ("sshchkintr: istat %x dstat %x sstat0 %x dsps %lx "
+ "dsa %lx sbcl %x sts %x msg %x %x sfbr %x\n",
istat, dstat, sstat0, rp->ssh_dsps, rp->ssh_dsa,
rp->ssh_sbcl, acb->stat[0], acb->msg[0], acb->msg[1],
rp->ssh_sfbr);
diff --git a/sys/arch/mvme68k/dev/vme.c b/sys/arch/mvme68k/dev/vme.c
index 1dbca59ebca..2aa306619aa 100644
--- a/sys/arch/mvme68k/dev/vme.c
+++ b/sys/arch/mvme68k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.16 2003/10/08 20:18:34 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.17 2003/12/20 00:34:28 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -137,16 +137,22 @@ vmepmap(sc, vmeaddr, len, bustype)
case BUS_PCC:
switch (bustype) {
case BUS_VMES:
- printf("base 0x%8x/0x%8x len 0x%x\n",
+#ifdef DEBUG
+ printf("base %8p/0x%8x len 0x%x\n",
vmeaddr, base, len);
+#endif
if (base > VME1_A16BASE &&
(base+len - VME1_A16BASE) < VME1_A16D16LEN) {
base = base - VME1_A16BASE + VME1_A16D16BASE;
+#ifdef DEBUG
printf("vmes1: base = 0x%8x\n", base); /* 1:1 */
+#endif
} else if (base > VME1_A32D16BASE &&
base+len < VME1_A16BASE) {
/* 1:1 mapped */
+#ifdef DEBUG
printf("vmes2: base = 0x%8x\n", base);
+#endif
} else {
printf("%s: cannot map pa 0x%x len 0x%x\n",
sc->sc_dev.dv_xname, base, len);
@@ -172,7 +178,9 @@ vmepmap(sc, vmeaddr, len, bustype)
case BUS_PCCTWO:
switch (bustype) {
case BUS_VMES:
- /*printf("base %x len %d\n", base, len);*/
+#ifdef DEBUG
+ printf("base %x len %d\n", base, len);
+#endif
if (base > VME2_A16BASE &&
(base+len-VME2_A16BASE) < VME2_A16D16LEN) {
/* XXX busted? */
@@ -184,7 +192,9 @@ vmepmap(sc, vmeaddr, len, bustype)
/* XXX busted? */
base = base + VME2_A32D16BASE;
} else {
+#ifdef DEBUG
printf("vme2chip_map\n");
+#endif
base = vme2chip_map(base, len, 16);
if (base == NULL)
return (NULL);
@@ -456,25 +466,25 @@ vme2chip_init(sc)
ctl = vme2->vme2_masterctl;
printf("%s: using BUG parameters\n", sc->sc_dev.dv_xname);
/* setup a A32D16 space */
- printf("%s: 1phys 0x%08x-0x%08x to VME 0x%08x-0x%08x\n",
+ printf("%s: 1phys 0x%08lx-0x%08lx to VME 0x%08lx-0x%08lx\n",
sc->sc_dev.dv_xname,
vme2->vme2_master1 << 16, vme2->vme2_master1 & 0xffff0000,
vme2->vme2_master1 << 16, vme2->vme2_master1 & 0xffff0000);
/* setup a A32D32 space */
- printf("%s: 2phys 0x%08x-0x%08x to VME 0x%08x-0x%08x\n",
+ printf("%s: 2phys 0x%08lx-0x%08lx to VME 0x%08lx-0x%08lx\n",
sc->sc_dev.dv_xname,
vme2->vme2_master2 << 16, vme2->vme2_master2 & 0xffff0000,
vme2->vme2_master2 << 16, vme2->vme2_master2 & 0xffff0000);
/* setup a A24D16 space */
- printf("%s: 3phys 0x%08x-0x%08x to VME 0x%08x-0x%08x\n",
+ printf("%s: 3phys 0x%08lx-0x%08lx to VME 0x%08lx-0x%08lx\n",
sc->sc_dev.dv_xname,
vme2->vme2_master3 << 16, vme2->vme2_master3 & 0xffff0000,
vme2->vme2_master3 << 16, vme2->vme2_master3 & 0xffff0000);
/* setup a XXXXXX space */
- printf("%s: 4phys 0x%08x-0x%08x to VME 0x%08x-0x%08x\n",
+ printf("%s: 4phys 0x%08lx-0x%08lx to VME 0x%08lx-0x%08lx\n",
sc->sc_dev.dv_xname,
vme2->vme2_master4 << 16, vme2->vme2_master4 & 0xffff0000,
(vme2->vme2_master4 << 16) + (vme2->vme2_master4mod << 16),
diff --git a/sys/arch/mvme68k/dev/vmel.c b/sys/arch/mvme68k/dev/vmel.c
index 3e87d031e52..5421d5da1a0 100644
--- a/sys/arch/mvme68k/dev/vmel.c
+++ b/sys/arch/mvme68k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.10 2003/06/02 05:09:14 deraadt Exp $ */
+/* $OpenBSD: vmel.c,v 1.11 2003/12/20 00:34:28 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -162,10 +162,12 @@ vmelmmap(dev, off, prot)
{
int unit = minor(dev);
struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit];
- void * pa;
+ void *pa;
pa = vmepmap(sc->sc_vme, (void *)(int)off, NBPG, BUS_VMEL);
- printf("vmel %x pa %x\n", off, pa);
+#ifdef DEBUG
+ printf("vmel %llx pa %p\n", off, pa);
+#endif
if (pa == NULL)
return (-1);
return (m68k_btop(pa));
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 2ca248d44e7..d315b5959eb 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.78 2003/11/06 21:09:35 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.79 2003/12/20 00:34:32 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -396,7 +396,7 @@ again:
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- printf("avail mem = %ld (%ld pages)\n", ptoa(uvmexp.free), uvmexp.free);
+ printf("avail mem = %ld (%d pages)\n", ptoa(uvmexp.free), uvmexp.free);
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * PAGE_SIZE);
@@ -506,8 +506,7 @@ identifycpu()
switch (cputyp) {
#ifdef MVME147
case CPU_147:
- bcopy(&brdid.suffix, suffix, sizeof brdid.suffix);
- snprintf(suffix, sizeof suffix, "MVME%x", brdid.model, suffix);
+ snprintf(suffix, sizeof suffix, "MVME%x", brdid.model);
cpuspeed = pccspeed((struct pccreg *)IIOV(0xfffe1000));
snprintf(speed, sizeof speed, "%02d", cpuspeed);
break;
@@ -681,7 +680,7 @@ halt_establish(fn, pri)
__dead void
boot(howto)
- register int howto;
+ int howto;
{
/* If system is cold, just halt. */
if (cold) {
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index 6ebeba9a82d..bcdbe6acb26 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.50 2003/06/02 23:27:51 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.51 2003/12/20 00:34:32 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -616,7 +616,7 @@ copyfault:
if (type == T_MMUFLT) {
if (p && p->p_addr->u_pcb.pcb_onfault)
goto copyfault;
- printf("uvm_fault(%x, %x, 0, %x) -> %x\n",
+ printf("uvm_fault(%p, %lx, 0, %x) -> %x\n",
map, va, ftype, rv);
printf(" type %x, code [mmu,,ssw]: %x\n",
type, code);
@@ -631,9 +631,9 @@ copyfault:
}
sv.sival_int = v;
trapsignal(p, i, ucode, typ, sv);
+out:
if ((type & T_USER) == 0)
return;
-out:
userret(p, &frame, sticks, v, 1);
}