Fix printf() and other warnings when compiled with DEBUG defined.

This commit is contained in:
scottr 1997-04-02 22:37:21 +00:00
parent 206e950042
commit aa88a240fe
16 changed files with 214 additions and 208 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ac.c,v 1.8 1997/03/31 07:32:14 scottr Exp $ */
/* $NetBSD: ac.c,v 1.9 1997/04/02 22:37:21 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -281,7 +281,7 @@ accommand(dev, command, bufp, buflen)
#ifdef DEBUG
if (ac_debug & ACD_FOLLOW)
printf("accommand(dev=%x, cmd=%x, buf=%x, buflen=%x)\n",
printf("accommand(dev=%x, cmd=%x, buf=%p, buflen=%x)\n",
dev, command, bufp, buflen);
#endif
if (sc->sc_flags & ACF_ACTIVE)
@ -345,7 +345,7 @@ acstart(arg)
#ifdef DEBUG
if (ac_debug & ACD_FOLLOW)
printf("acstart(unit=%x)\n", unit);
printf("acstart(unit=%x)\n", sc->sc_dev.dv_unit);
#endif
if (scsiustart(sc->sc_dev.dv_parent->dv_unit))
acgo(arg);
@ -361,7 +361,7 @@ acgo(arg)
#ifdef DEBUG
if (ac_debug & ACD_FOLLOW)
printf("acgo(unit=%x): ", unit);
printf("acgo(unit=%x): ", sc->sc_dev.dv_unit);
#endif
stat = scsigo(sc->sc_dev.dv_parent->dv_unit, sc->sc_target,
sc->sc_lun, bp, sc->sc_cmd, 0);
@ -464,7 +464,7 @@ acconvert(sbuf, dbuf, ne)
sbuf += sizeof *hdr;
#ifdef DEBUG
if (ac_debug & ACD_FOLLOW)
printf("element status: first=%d, num=%d, len=%d\n",
printf("element status: first=%d, num=%d, len=%ld\n",
hdr->ac_felt, hdr->ac_nelt, hdr->ac_bcount);
if (hdr->ac_nelt != ne) {
printf("acconvert: # of elements, %d != %d\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: ct.c,v 1.20 1997/03/31 07:32:16 scottr Exp $ */
/* $NetBSD: ct.c,v 1.21 1997/04/02 22:37:23 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -648,7 +648,7 @@ cteof(sc, bp)
blks = sc->sc_stat.c_blk - sc->sc_blkno - 1;
#ifdef DEBUG
if (ctdebug & CDB_FILES)
printf("cteof: bc %d oblk %d nblk %d read %d, resid %d\n",
printf("cteof: bc %ld oblk %d nblk %ld read %ld, resid %ld\n",
bp->b_bcount, sc->sc_blkno, sc->sc_stat.c_blk,
blks, bp->b_bcount - CTKTOB(blks));
#endif
@ -744,7 +744,7 @@ ctintr(arg)
hpibrecv(ctlr, slave, C_QSTAT, &stat, 1);
#ifdef DEBUG
if (ctdebug & CDB_FILES)
printf("ctintr: return stat 0x%x, A%x F%x blk %d\n",
printf("ctintr: return stat 0x%x, A%x F%x blk %ld\n",
stat, sc->sc_stat.c_aef,
sc->sc_stat.c_fef, sc->sc_stat.c_blk);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: dcm.c,v 1.36 1997/03/31 07:29:49 scottr Exp $ */
/* $NetBSD: dcm.c,v 1.37 1997/04/02 22:37:26 scottr Exp $ */
/*
* Copyright (c) 1995, 1996 Jason R. Thorpe. All rights reserved.
@ -911,7 +911,7 @@ dcmioctl(dev, cmd, data, flag, p)
#ifdef DEBUG
if (dcmdebug & DDB_IOCTL)
printf("%s port %d: dcmioctl: cmd %x data %x flag %x\n",
printf("%s port %d: dcmioctl: cmd %lx data %x flag %x\n",
sc->sc_dev.dv_xname, port, cmd, *data, flag);
#endif
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
@ -1198,7 +1198,7 @@ again:
}
#ifdef DEBUG
if (dcmdebug & DDB_INTR)
printf("%s port %d: dcmstart(%d): head %x tail %x outqcc %d\n",
printf("%s port %d: dcmstart: head %x tail %x outqcc %d\n",
sc->sc_dev.dv_xname, port, head, tail, tp->t_outq.c_cc);
#endif
out:

View File

@ -1,4 +1,4 @@
/* $NetBSD: dma.c,v 1.14 1997/04/01 03:10:57 scottr Exp $ */
/* $NetBSD: dma.c,v 1.15 1997/04/02 22:37:27 scottr Exp $ */
/*
* Copyright (c) 1995, 1996, 1997
@ -341,7 +341,7 @@ dmago(unit, addr, count, flags)
#endif
#ifdef DEBUG
if (dmadebug & DDB_FOLLOW)
printf("dmago(%d, %x, %x, %x)\n",
printf("dmago(%d, %p, %x, %x)\n",
unit, addr, count, flags);
if (flags & DMAGO_LWORD)
dmalword[unit]++;
@ -447,12 +447,12 @@ dmago(unit, addr, count, flags)
}
#ifdef DEBUG
if (dmadebug & DDB_IO) {
if ((dmadebug&DDB_WORD) && (dc->dm_cmd&DMA_WORD) ||
(dmadebug&DDB_LWORD) && (dc->dm_cmd&DMA_LWORD)) {
if (((dmadebug&DDB_WORD) && (dc->dm_cmd&DMA_WORD)) ||
((dmadebug&DDB_LWORD) && (dc->dm_cmd&DMA_LWORD))) {
printf("dmago: cmd %x, flags %x\n",
dc->dm_cmd, dc->dm_flags);
for (seg = 0; seg <= dc->dm_last; seg++)
printf(" %d: %d@%x\n", seg,
printf(" %d: %d@%p\n", seg,
dc->dm_chain[seg].dc_count,
dc->dm_chain[seg].dc_addr);
}
@ -526,8 +526,8 @@ dmaintr(arg)
found++;
#ifdef DEBUG
if (dmadebug & DDB_IO) {
if ((dmadebug&DDB_WORD) && (dc->dm_cmd&DMA_WORD) ||
(dmadebug&DDB_LWORD) && (dc->dm_cmd&DMA_LWORD))
if (((dmadebug&DDB_WORD) && (dc->dm_cmd&DMA_WORD)) ||
((dmadebug&DDB_LWORD) && (dc->dm_cmd&DMA_LWORD)))
printf("dmaintr: flags %x unit %d stat %x next %d\n",
dc->dm_flags, i, stat, dc->dm_cur + 1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fhpib.c,v 1.15 1997/03/31 07:32:20 scottr Exp $ */
/* $NetBSD: fhpib.c,v 1.16 1997/04/02 22:37:29 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -475,8 +475,8 @@ fhpibdone(hs)
hs->sc_addr += cnt;
hs->sc_count -= cnt;
#ifdef DEBUG
if ((fhpibdebug & FDB_DMA) && fhpibdebugunit == unit)
printf("fhpibdone: addr %x cnt %d\n",
if ((fhpibdebug & FDB_DMA) && fhpibdebugunit == sc->sc_dev.dv_unit)
printf("fhpibdone: addr %p cnt %d\n",
hs->sc_addr, hs->sc_count);
#endif
if (hs->sc_flags & HPIBF_READ) {
@ -513,9 +513,6 @@ fhpibintr(arg)
struct fhpibdevice *hd = sc->sc_regs;
struct hpibqueue *hq;
int stat0;
#ifdef DEBUG
int unit = sc->sc_dev.dv_unit;
#endif
stat0 = hd->hpib_ids;
if ((stat0 & (IDS_IE|IDS_IR)) != (IDS_IE|IDS_IR)) {
@ -535,7 +532,7 @@ fhpibintr(arg)
return(0);
}
#ifdef DEBUG
if ((fhpibdebug & FDB_DMA) && fhpibdebugunit == unit)
if ((fhpibdebug & FDB_DMA) && fhpibdebugunit == sc->sc_dev.dv_unit)
printf("fhpibintr: flags %x\n", hs->sc_flags);
#endif
hq = hs->sc_queue.tqh_first;
@ -563,7 +560,8 @@ fhpibintr(arg)
hd->hpib_imask = 0;
#ifdef DEBUG
stat0 = fhpibppoll(hs);
if ((fhpibdebug & FDB_PPOLL) && unit == fhpibdebugunit)
if ((fhpibdebug & FDB_PPOLL) &&
fhpibdebugunit == sc->sc_dev.dv_unit)
printf("fhpibintr: got PPOLL status %x\n", stat0);
if ((stat0 & (0x80 >> hq->hq_slave)) == 0) {
/*
@ -573,9 +571,10 @@ fhpibintr(arg)
DELAY(fhpibppolldelay);
stat0 = fhpibppoll(hs);
if ((stat0 & (0x80 >> hq->hq_slave)) == 0 &&
(fhpibdebug & FDB_PPOLL) && unit == fhpibdebugunit)
(fhpibdebug & FDB_PPOLL) &&
fhpibdebugunit == sc->sc_dev.dv_unit)
printf("fhpibintr: PPOLL: unit %d slave %d stat %x\n",
unit, dq->dq_slave, stat0);
sc->sc_dev.dv_unit, hq->hq_slave, stat0);
}
#endif
hs->sc_flags &= ~HPIBF_PPOLL;
@ -619,7 +618,7 @@ fhpibwait(hd, x)
if (timo == 0) {
#ifdef DEBUG
if (fhpibdebug & FDB_FAIL)
printf("fhpibwait(%x, %x) timeout\n", hd, x);
printf("fhpibwait(%p, %x) timeout\n", hd, x);
#endif
return(-1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.24 1997/03/31 07:34:12 scottr Exp $ */
/* $NetBSD: grf.c,v 1.25 1997/04/02 22:37:30 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -626,7 +626,7 @@ grfmap(dev, addrp, p)
#ifdef DEBUG
if (grfdebug & GDB_MMAP)
printf("grfmap(%d): addr %x\n", p->p_pid, *addrp);
printf("grfmap(%d): addr %p\n", p->p_pid, *addrp);
#endif
len = gp->g_display.gd_regsize + gp->g_display.gd_fbsize;
flags = MAP_SHARED;
@ -658,7 +658,7 @@ grfunmap(dev, addr, p)
#ifdef DEBUG
if (grfdebug & GDB_MMAP)
printf("grfunmap(%d): dev %x addr %x\n", p->p_pid, dev, addr);
printf("grfunmap(%d): dev %x addr %p\n", p->p_pid, dev, addr);
#endif
if (addr == 0)
return(EINVAL); /* XXX: how do we deal with this? */
@ -677,7 +677,7 @@ iommap(dev, addrp)
#ifdef DEBUG
if (grfdebug & (GDB_MMAP|GDB_IOMAP))
printf("iommap(%d): addr %x\n", curproc->p_pid, *addrp);
printf("iommap(%d): addr %p\n", curproc->p_pid, *addrp);
#endif
return(EINVAL);
}
@ -691,7 +691,7 @@ iounmmap(dev, addr)
int unit = minor(dev);
if (grfdebug & (GDB_MMAP|GDB_IOMAP))
printf("iounmmap(%d): id %d addr %x\n",
printf("iounmmap(%d): id %d addr %p\n",
curproc->p_pid, unit, addr);
#endif
return(0);
@ -781,7 +781,7 @@ grflckmmap(dev, addrp)
struct proc *p = curproc; /* XXX */
if (grfdebug & (GDB_MMAP|GDB_LOCK))
printf("grflckmmap(%d): addr %x\n",
printf("grflckmmap(%d): addr %p\n",
p->p_pid, *addrp);
#endif
return(EINVAL);
@ -796,7 +796,7 @@ grflckunmmap(dev, addr)
int unit = minor(dev);
if (grfdebug & (GDB_MMAP|GDB_LOCK))
printf("grflckunmmap(%d): id %d addr %x\n",
printf("grflckunmmap(%d): id %d addr %p\n",
curproc->p_pid, unit, addr);
#endif
return(EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: hil.c,v 1.33 1997/04/01 19:29:09 scottr Exp $ */
/* $NetBSD: hil.c,v 1.34 1997/04/02 22:37:32 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -144,7 +144,7 @@ hilsoftinit(unit, hilbase)
#ifdef DEBUG
if (hildebug & HDB_FOLLOW)
printf("hilsoftinit(%d, %x)\n", unit, hilbase);
printf("hilsoftinit(%d, %p)\n", unit, hilbase);
#endif
/*
* Initialize loop information
@ -190,7 +190,7 @@ hilinit(unit, hilbase)
struct hil_softc *hilp = &hil_softc[unit];
#ifdef DEBUG
if (hildebug & HDB_FOLLOW)
printf("hilinit(%d, %x)\n", unit, hilbase);
printf("hilinit(%d, %p)\n", unit, hilbase);
#endif
/*
* Initialize software (if not already done).
@ -443,7 +443,7 @@ hilioctl(dev, cmd, data, flag, p)
#ifdef DEBUG
if (hildebug & HDB_FOLLOW)
printf("hilioctl(%d): dev %x cmd %x\n",
printf("hilioctl(%d): dev %x cmd %lx\n",
p->p_pid, device, cmd);
#endif
@ -1059,7 +1059,7 @@ hilqalloc(hilp, qip, p)
#ifdef DEBUG
if (hildebug & HDB_FOLLOW)
printf("hilqalloc(%d): addr %x\n", p->p_pid, qip->addr);
printf("hilqalloc(%d): addr %p\n", p->p_pid, qip->addr);
#endif
return(EINVAL);
}
@ -1480,7 +1480,7 @@ hilreset(hilp)
#ifdef DEBUG
if (hildebug & HDB_FOLLOW)
printf("hilreset(%x)\n", hilp);
printf("hilreset(%p)\n", hilp);
#endif
/*
* Initialize the loop: reconfigure, don't report errors,
@ -1535,7 +1535,7 @@ hiliddev(hilp)
#ifdef DEBUG
if (hildebug & HDB_IDMODULE)
printf("hiliddev(%x): max %d, looking for idmodule...",
printf("hiliddev(%p): max %d, looking for idmodule...",
hilp, hilp->hl_maxdev);
#endif
for (i = 1; i <= hilp->hl_maxdev; i++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ppi.c,v 1.12 1997/03/31 07:37:30 scottr Exp $ */
/* $NetBSD: ppi.c,v 1.13 1997/04/02 22:37:33 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -214,7 +214,7 @@ ppistart(arg)
#ifdef DEBUG
if (ppidebug & PDB_FOLLOW)
printf("ppistart(%x)\n", unit);
printf("ppistart(%x)\n", sc->sc_dev.dv_unit);
#endif
sc->sc_flags &= ~PPIF_DELAY;
wakeup(sc);
@ -243,7 +243,7 @@ ppiread(dev, uio, flags)
#ifdef DEBUG
if (ppidebug & PDB_FOLLOW)
printf("ppiread(%x, %x)\n", dev, uio);
printf("ppiread(%x, %p)\n", dev, uio);
#endif
return (ppirw(dev, uio));
}
@ -257,7 +257,7 @@ ppiwrite(dev, uio, flags)
#ifdef DEBUG
if (ppidebug & PDB_FOLLOW)
printf("ppiwrite(%x, %x)\n", dev, uio);
printf("ppiwrite(%x, %p)\n", dev, uio);
#endif
return (ppirw(dev, uio));
}
@ -283,7 +283,7 @@ ppirw(dev, uio)
#ifdef DEBUG
if (ppidebug & (PDB_FOLLOW|PDB_IO))
printf("ppirw(%x, %x, %c): burst %d, timo %d, resid %x\n",
printf("ppirw(%x, %p, %c): burst %d, timo %d, resid %x\n",
dev, uio, uio->uio_rw == UIO_READ ? 'R' : 'W',
sc->sc_burst, sc->sc_timo, uio->uio_resid);
#endif
@ -337,7 +337,7 @@ again:
hpibfree(sc->sc_dev.dv_parent, &sc->sc_hq);
#ifdef DEBUG
if (ppidebug & PDB_IO)
printf("ppirw: %s(%d, %d, %x, %x, %d) -> %d\n",
printf("ppirw: %s(%d, %d, %x, %p, %d) -> %d\n",
uio->uio_rw == UIO_READ ? "recv" : "send",
ctlr, slave, sc->sc_sec, cp, len, cnt);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: rd.c,v 1.28 1997/03/31 07:40:00 scottr Exp $ */
/* $NetBSD: rd.c,v 1.29 1997/04/02 22:37:35 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -73,37 +73,6 @@
#include <vm/vm_prot.h>
#include <vm/pmap.h>
int rdmatch __P((struct device *, struct cfdata *, void *));
void rdattach __P((struct device *, struct device *, void *));
struct cfattach rd_ca = {
sizeof(struct rd_softc), rdmatch, rdattach
};
struct cfdriver rd_cd = {
NULL, "rd", DV_DISK
};
int rdident __P((struct device *, struct rd_softc *,
struct hpibbus_attach_args *));
void rdreset __P((struct rd_softc *));
void rdustart __P((struct rd_softc *));
int rdgetinfo __P((dev_t));
void rdrestart __P((void *));
struct buf *rdfinish __P((struct rd_softc *, struct buf *));
void rdrestart __P((void *));
void rdustart __P((struct rd_softc *));
struct buf *rdfinish __P((struct rd_softc *, struct buf *));
void rdstart __P((void *));
void rdgo __P((void *));
void rdintr __P((void *));
int rdstatus __P((struct rd_softc *));
int rderror __P((int));
bdev_decl(rd);
cdev_decl(rd);
int rderrthresh = RDRETRY-1; /* when to start reporting errors */
#ifdef DEBUG
@ -247,6 +216,40 @@ struct rdidentinfo rdidentinfo[] = {
};
int numrdidentinfo = sizeof(rdidentinfo) / sizeof(rdidentinfo[0]);
bdev_decl(rd);
cdev_decl(rd);
int rdident __P((struct device *, struct rd_softc *,
struct hpibbus_attach_args *));
void rdreset __P((struct rd_softc *));
void rdustart __P((struct rd_softc *));
int rdgetinfo __P((dev_t));
void rdrestart __P((void *));
struct buf *rdfinish __P((struct rd_softc *, struct buf *));
void rdrestart __P((void *));
void rdustart __P((struct rd_softc *));
struct buf *rdfinish __P((struct rd_softc *, struct buf *));
void rdstart __P((void *));
void rdgo __P((void *));
void rdintr __P((void *));
int rdstatus __P((struct rd_softc *));
int rderror __P((int));
#ifdef DEBUG
void rdprinterr __P((char *, short, char **));
#endif
int rdmatch __P((struct device *, struct cfdata *, void *));
void rdattach __P((struct device *, struct device *, void *));
struct cfattach rd_ca = {
sizeof(struct rd_softc), rdmatch, rdattach
};
struct cfdriver rd_cd = {
NULL, "rd", DV_DISK
};
int
rdmatch(parent, match, aux)
struct device *parent;
@ -627,7 +630,7 @@ rdstrategy(bp)
#ifdef DEBUG
if (rddebug & RDB_FOLLOW)
printf("rdstrategy(%x): dev %x, bn %x, bcount %x, %c\n",
printf("rdstrategy(%p): dev %x, bn %x, bcount %lx, %c\n",
bp, bp->b_dev, bp->b_blkno, bp->b_bcount,
(bp->b_flags & B_READ) ? 'R' : 'W');
#endif
@ -744,7 +747,7 @@ rdstart(arg)
again:
#ifdef DEBUG
if (rddebug & RDB_FOLLOW)
printf("rdstart(%s): bp %x, %c\n", sc->sc_dev.dv_xname, bp,
printf("rdstart(%s): bp %p, %c\n", rs->sc_dev.dv_xname, bp,
(bp->b_flags & B_READ) ? 'R' : 'W');
#endif
part = rdpart(bp->b_dev);
@ -760,7 +763,7 @@ again:
rs->sc_ioc.c_cmd = bp->b_flags & B_READ ? C_READ : C_WRITE;
#ifdef DEBUG
if (rddebug & RDB_IO)
printf("rdstart: hpibsend(%x, %x, %x, %x, %x)\n",
printf("rdstart: hpibsend(%x, %x, %x, %p, %x)\n",
ctlr, slave, C_CMD,
&rs->sc_ioc.c_unit, sizeof(rs->sc_ioc)-2);
#endif
@ -786,7 +789,7 @@ again:
*/
#ifdef DEBUG
if (rddebug & RDB_ERROR)
printf("%s: rdstart: cmd %x adr %d blk %d len %d ecnt %d\n",
printf("%s: rdstart: cmd %x adr %lx blk %d len %d ecnt %ld\n",
rs->sc_dev.dv_xname, rs->sc_ioc.c_cmd, rs->sc_ioc.c_addr,
bp->b_blkno, rs->sc_resid, rs->sc_tab.b_errcnt);
rs->sc_stats.rdretries++;
@ -848,7 +851,7 @@ rdintr(arg)
#ifdef DEBUG
if (rddebug & RDB_FOLLOW)
printf("rdintr(%d): bp %x, %c, flags %x\n", unit, bp,
printf("rdintr(%d): bp %p, %c, flags %x\n", unit, bp,
(bp->b_flags & B_READ) ? 'R' : 'W', rs->sc_flags);
if (bp == NULL) {
printf("%s: bp == NULL\n", rs->sc_dev.dv_xname);
@ -1176,17 +1179,18 @@ rdsize(dev)
}
#ifdef DEBUG
void
rdprinterr(str, err, tab)
char *str;
short err;
char *tab[];
char **tab;
{
int i;
int printed;
if (err == 0)
return;
printf(" %s error field:", str, err);
printf(" %s error %d field:", str, err);
printed = 0;
for (i = 0; i < 16; i++)
if (err & (0x8000 >> i))

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.30 1997/03/31 07:40:05 scottr Exp $ */
/* $NetBSD: sd.c,v 1.31 1997/04/02 22:37:36 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -597,7 +597,7 @@ sdlblkstrat(bp, bsize)
addr = bp->b_un.b_addr;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
printf("sdlblkstrat: bp %x flags %x bn %x resid %x addr %x\n",
printf("sdlblkstrat: bp %p flags %lx bn %x resid %x addr %p\n",
bp, bp->b_flags, bn, resid, addr);
#endif
@ -614,7 +614,7 @@ sdlblkstrat(bp, bsize)
cbp->b_bcount = bsize;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
printf(" readahead: bn %x cnt %x off %x addr %x\n",
printf(" readahead: bn %x cnt %x off %x addr %p\n",
cbp->b_blkno, count, boff, addr);
#endif
sdstrategy(cbp);
@ -631,7 +631,7 @@ sdlblkstrat(bp, bsize)
bcopy(addr, &cbuf[boff], count);
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
printf(" writeback: bn %x cnt %x off %x addr %x\n",
printf(" writeback: bn %x cnt %x off %x addr %p\n",
cbp->b_blkno, count, boff, addr);
#endif
} else {
@ -641,7 +641,7 @@ sdlblkstrat(bp, bsize)
cbp->b_bcount = count;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
printf(" fulltrans: bn %x cnt %x addr %x\n",
printf(" fulltrans: bn %x cnt %x addr %p\n",
cbp->b_blkno, count, addr);
#endif
}
@ -659,7 +659,7 @@ done:
addr += count;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
printf(" done: bn %x resid %x addr %x\n",
printf(" done: bn %x resid %x addr %p\n",
bn, resid, addr);
#endif
}
@ -910,7 +910,7 @@ sdgo(arg)
pad = (bp->b_bcount & (sc->sc_blksize - 1)) != 0;
#ifdef DEBUG
if (pad)
printf("%s: partial block xfer -- %x bytes\n",
printf("%s: partial block xfer -- %lx bytes\n",
sc->sc_dev.dv_xname, bp->b_bcount);
#endif
sc->sc_stats.sdtransfers++;
@ -928,7 +928,7 @@ sdgo(arg)
}
#ifdef DEBUG
if (sddebug & SDB_ERROR)
printf("%s: sdstart: %s adr %d blk %d len %d ecnt %d\n",
printf("%s: sdstart: %s adr %p blk %ld len %ld ecnt %ld\n",
sc->sc_dev.dv_xname,
bp->b_flags & B_READ? "read" : "write",
bp->b_un.b_addr, bp->b_cylin, bp->b_bcount,
@ -966,7 +966,7 @@ sdintr(arg, stat)
if (cond < 0 && sc->sc_tab.b_errcnt++ < SDRETRY) {
#ifdef DEBUG
if (sddebug & SDB_ERROR)
printf("%s: retry #%d\n",
printf("%s: retry #%ld\n",
sc->sc_dev.dv_xname,
sc->sc_tab.b_errcnt);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: st.c,v 1.21 1997/03/31 07:40:08 scottr Exp $ */
/* $NetBSD: st.c,v 1.22 1997/04/02 22:37:38 scottr Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -174,6 +174,12 @@ int stwrite __P((dev_t, struct uio *, int));
void ststrategy __P((struct buf *));
int stdump __P((dev_t));
#ifdef DEBUG
void dumpxsense __P((struct st_xsense *));
void prtmodsel __P((struct mode_select_data *, int));
void prtmodstat __P((struct mode_sense *));
#endif /* DEBUG */
static void stfinish __P((struct st_softc *, struct buf *));
static void sterror __P((struct st_softc *, int));
static int stmatch __P((struct device *, struct cfdata *, void *));
@ -753,7 +759,7 @@ stgo(arg)
if (bp->b_bcount & 1) {
#ifdef DEBUG
if (st_debug & ST_ODDIO)
printf("%s: stgo: odd count %d using manual transfer\n",
printf("%s: stgo: odd count %ld using manual transfer\n",
sc->sc_dev.dv_xname, bp->b_bcount);
#endif
stat = scsi_tt_oddio(sc->sc_dev.dv_parent->dv_unit,
@ -1006,7 +1012,7 @@ stintr(arg, stat)
*/
#ifdef DEBUG
if (st_debug & ST_ODDIO)
printf("%s: stintr odd count %d, do BSR then oddio\n",
printf("%s: stintr odd count %ld, do BSR then oddio\n",
sc->sc_dev.dv_xname,
bp->b_bcount - bp->b_resid);
#endif
@ -1048,7 +1054,7 @@ stintr(arg, stat)
}
#ifdef DEBUG
if ((st_debug & ST_BRESID) && bp->b_resid != 0)
printf("b_resid %d b_flags 0x%x b_error 0x%x\n",
printf("b_resid %ld b_flags 0x%lx b_error 0x%x\n",
bp->b_resid, bp->b_flags, bp->b_error);
#endif
/* asked for more filemarks then on tape */
@ -1342,7 +1348,6 @@ prtkey(sc)
}
#ifdef DEBUG
void
dumpxsense(sensebuf)
struct st_xsense *sensebuf;

View File

@ -1,4 +1,4 @@
/* $NetBSD: stvar.h,v 1.5 1997/03/31 07:40:09 scottr Exp $ */
/* $NetBSD: stvar.h,v 1.6 1997/04/02 22:37:40 scottr Exp $ */
/*
* Copyright (c) 1990 University of Utah.
@ -220,9 +220,4 @@ void stintr __P((void *, int));
void stxsense __P((int, int, int, struct st_softc *));
void prtkey __P((struct st_softc *));
#ifdef DEBUG
void dumpxsense __P((struct st_xsense *));
void ptrmodsel __P((struct mode_select_data *, int));
void ptrmodstat __P((struct mode_sense *));
#endif /* DEBUG */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_machdep.c,v 1.11 1997/04/01 19:59:59 scottr Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.12 1997/04/02 22:41:34 scottr Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Jason R. Thorpe. All rights reserved.
@ -498,8 +498,8 @@ hpux_sendsig(catcher, sig, mask, code)
#ifdef DEBUG
if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
printf("hpux_sendsig(%d): sig %d ssp %x usp %x scp %x ft %d\n",
p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft);
printf("hpux_sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n",
p->p_pid, sig, &oonstack, fp, &fp->hsf_sc, ft);
#endif
if (useracc((caddr_t)fp, fsize, B_WRITE) == 0) {
@ -574,10 +574,11 @@ hpux_sendsig(catcher, sig, mask, code)
}
#ifdef DEBUG
if ((hpuxsigdebug & SDB_FPSTATE) && *(char *)&kfp->sf_state.ss_fpstate)
printf("hpux_sendsig(%d): copy out FP state (%x) to %x\n",
p->p_pid, *(u_int *)&kfp->sf_state.ss_fpstate,
&kfp->sf_state.ss_fpstate);
if ((hpuxsigdebug & SDB_FPSTATE) &&
*(char *)&kfp->hsf_sigstate.hss_fpstate)
printf("hpux_sendsig(%d): copy out FP state (%x) to %p\n",
p->p_pid, *(u_int *)&kfp->hsf_sigstate.hss_fpstate,
&kfp->hsf_sigstate.hss_fpstate);
#endif
/*
@ -602,9 +603,9 @@ hpux_sendsig(catcher, sig, mask, code)
#ifdef DEBUG
if (hpuxsigdebug & SDB_FOLLOW) {
printf(
"hpux_sendsig(%d): sig %d scp %x fp %x sc_sp %x sc_ap %x\n",
p->p_pid, sig, kfp->sf_scp, fp,
kfp->sf_sc.sc_sp, kfp->sf_sc.sc_ap);
"hpux_sendsig(%d): sig %d scp %p fp %p sc_sp %x sc_ap %x\n",
p->p_pid, sig, kfp->hsf_scp, fp,
kfp->hsf_sc.hsc_sp, kfp->hsf_sc._hsc_ap);
}
#endif
@ -650,7 +651,7 @@ hpux_sys_sigreturn(p, v, retval)
scp = SCARG(uap, sigcntxp);
#ifdef DEBUG
if (hpuxsigdebug & SDB_FOLLOW)
printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp);
printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp);
#endif
if ((int)scp & 1)
return (EINVAL);
@ -707,9 +708,9 @@ hpux_sys_sigreturn(p, v, retval)
return (EJUSTRETURN);
#ifdef DEBUG
if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
printf("sigreturn(%d): ssp %x usp %x scp %x ft %d\n",
p->p_pid, &flags, scp->sc_sp, SCARG(uap, sigcntxp),
(flags & HSS_RTEFRAME) ? tstate.ss_frame.f_format : -1);
printf("sigreturn(%d): ssp %p usp %x scp %p ft %d\n",
p->p_pid, &flags, scp->hsc_sp, SCARG(uap, sigcntxp),
(flags & HSS_RTEFRAME) ? tstate.hss_frame.f_format : -1);
#endif
/*
* Restore most of the users registers except for A6 and SP
@ -739,7 +740,7 @@ hpux_sys_sigreturn(p, v, retval)
#ifdef DEBUG
if (hpuxsigdebug & SDB_FOLLOW)
printf("sigreturn(%d): copy in %d of frame type %d\n",
p->p_pid, sz, tstate.ss_frame.f_format);
p->p_pid, sz, tstate.hss_frame.f_format);
#endif
}
@ -750,10 +751,10 @@ hpux_sys_sigreturn(p, v, retval)
m68881_restore(&tstate.hss_fpstate);
#ifdef DEBUG
if ((hpuxsigdebug & SDB_FPSTATE) && *(char *)&tstate.ss_fpstate)
printf("sigreturn(%d): copied in FP state (%x) at %x\n",
p->p_pid, *(u_int *)&tstate.ss_fpstate,
&tstate.ss_fpstate);
if ((hpuxsigdebug & SDB_FPSTATE) && *(char *)&tstate.hss_fpstate)
printf("sigreturn(%d): copied in FP state (%x) at %p\n",
p->p_pid, *(u_int *)&tstate.hss_fpstate,
&tstate.hss_fpstate);
if ((hpuxsigdebug & SDB_FOLLOW) ||
((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid))

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.86 1997/04/01 03:12:22 scottr Exp $ */
/* $NetBSD: machdep.c,v 1.87 1997/04/02 22:41:36 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -703,7 +703,7 @@ sendsig(catcher, sig, mask, code)
(void)grow(p, (unsigned)fp);
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
printf("sendsig(%d): sig %d ssp %x usp %x scp %x ft %d\n",
printf("sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n",
p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft);
#endif
if (useracc((caddr_t)fp, fsize, B_WRITE) == 0) {
@ -775,7 +775,7 @@ sendsig(catcher, sig, mask, code)
}
#ifdef DEBUG
if ((sigdebug & SDB_FPSTATE) && *(char *)&kfp->sf_state.ss_fpstate)
printf("sendsig(%d): copy out FP state (%x) to %x\n",
printf("sendsig(%d): copy out FP state (%x) to %p\n",
p->p_pid, *(u_int *)&kfp->sf_state.ss_fpstate,
&kfp->sf_state.ss_fpstate);
#endif
@ -793,7 +793,7 @@ sendsig(catcher, sig, mask, code)
frame->f_regs[SP] = (int)fp;
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
printf("sendsig(%d): sig %d scp %x fp %x sc_sp %x sc_ap %x\n",
printf("sendsig(%d): sig %d scp %p fp %p sc_sp %x sc_ap %x\n",
p->p_pid, sig, kfp->sf_scp, fp,
kfp->sf_sc.sc_sp, kfp->sf_sc.sc_ap);
#endif
@ -839,7 +839,7 @@ sys_sigreturn(p, v, retval)
scp = SCARG(uap, sigcntxp);
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp);
printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp);
#endif
if ((int)scp & 1)
return (EINVAL);
@ -892,9 +892,9 @@ sys_sigreturn(p, v, retval)
return (EJUSTRETURN);
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
printf("sigreturn(%d): ssp %x usp %x scp %x ft %d\n",
printf("sigreturn(%d): ssp %p usp %x scp %p ft %d\n",
p->p_pid, &flags, scp->sc_sp, SCARG(uap, sigcntxp),
(flags&SS_RTEFRAME) ? tstate.ss_frame.f_format : -1);
(flags & SS_RTEFRAME) ? tstate.ss_frame.f_format : -1);
#endif
/*
* Restore most of the users registers except for A6 and SP
@ -934,7 +934,7 @@ sys_sigreturn(p, v, retval)
#ifdef DEBUG
if ((sigdebug & SDB_FPSTATE) && *(char *)&tstate.ss_fpstate)
printf("sigreturn(%d): copied in FP state (%x) at %x\n",
printf("sigreturn(%d): copied in FP state (%x) at %p\n",
p->p_pid, *(u_int *)&tstate.ss_fpstate,
&tstate.ss_fpstate);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.31 1997/04/01 03:12:27 scottr Exp $ */
/* $NetBSD: pmap.c,v 1.32 1997/04/02 22:41:39 scottr Exp $ */
/*
* Copyright (c) 1991, 1993
@ -360,7 +360,7 @@ pmap_init(phys_start, phys_end)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_init(%x, %x)\n", phys_start, phys_end);
printf("pmap_init(%lx, %lx)\n", phys_start, phys_end);
#endif
/*
* Now that kernel map has been allocated, we can mark as
@ -386,9 +386,9 @@ bogons:
#ifdef DEBUG
if (pmapdebug & PDB_INIT) {
printf("pmap_init: Sysseg %x, Sysmap %x, Sysptmap %x\n",
printf("pmap_init: Sysseg %p, Sysmap %p, Sysptmap %p\n",
Sysseg, Sysmap, Sysptmap);
printf(" pstart %x, pend %x, vstart %x, vend %x\n",
printf(" pstart %lx, pend %lx, vstart %lx, vend %lx\n",
avail_start, avail_end, virtual_avail, virtual_end);
}
#endif
@ -409,7 +409,7 @@ bogons:
pmap_attributes = (char *) addr;
#ifdef DEBUG
if (pmapdebug & PDB_INIT)
printf("pmap_init: %x bytes: npages %x s0 %x(%x) tbl %x atr %x\n",
printf("pmap_init: %lx bytes: npages %x s0 %p(%p) tbl %p atr %p\n",
s, npages, Segtabzero, Segtabzeropa,
pv_table, pmap_attributes);
#endif
@ -452,7 +452,7 @@ bogons:
#endif
#ifdef DEBUG
if (pmapdebug & PDB_INIT)
printf("pmap_init: KPT: %d pages from %x to %x\n",
printf("pmap_init: KPT: %ld pages from %lx to %lx\n",
atop(s), addr, addr + s);
#endif
@ -491,7 +491,7 @@ bogons:
panic("pmap_init: cannot map range to pt_map");
#ifdef DEBUG
if (pmapdebug & PDB_INIT)
printf("pmap_init: pt_map [%x - %x)\n", addr, addr2);
printf("pmap_init: pt_map [%lx - %lx)\n", addr, addr2);
#endif
#if defined(M68040)
@ -639,7 +639,7 @@ pmap_map(va, spa, epa, prot)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_map(%x, %x, %x, %x)\n", va, spa, epa, prot);
printf("pmap_map(%lx, %lx, %lx, %x)\n", va, spa, epa, prot);
#endif
while (spa < epa) {
@ -670,7 +670,7 @@ pmap_create(size)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
printf("pmap_create(%x)\n", size);
printf("pmap_create(%lx)\n", size);
#endif
/*
@ -701,7 +701,7 @@ pmap_pinit(pmap)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
printf("pmap_pinit(%x)\n", pmap);
printf("pmap_pinit(%p)\n", pmap);
#endif
/*
@ -737,7 +737,7 @@ pmap_destroy(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_destroy(%x)\n", pmap);
printf("pmap_destroy(%p)\n", pmap);
#endif
simple_lock(&pmap->pm_lock);
@ -761,7 +761,7 @@ pmap_release(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_release(%x)\n", pmap);
printf("pmap_release(%p)\n", pmap);
#endif
#ifdef notdef /* DIAGNOSTIC */
@ -792,7 +792,7 @@ pmap_reference(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_reference(%x)\n", pmap);
printf("pmap_reference(%p)\n", pmap);
#endif
simple_lock(&pmap->pm_lock);
@ -811,7 +811,7 @@ pmap_activate(pmap, pcb)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_SEGTAB))
printf("pmap_activate(%x, %x)\n", pmap, pcb);
printf("pmap_activate(%p, %p)\n", pmap, pcb);
#endif
PMAP_ACTIVATE(pmap, pcb, pmap == curproc->p_vmspace->vm_map.pmap);
@ -842,7 +842,7 @@ pmap_remove(pmap, sva, eva)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
printf("pmap_remove(%x, %x, %x)\n", pmap, sva, eva);
printf("pmap_remove(%p, %lx, %lx)\n", pmap, sva, eva);
#endif
if (pmap == NULL)
@ -959,8 +959,8 @@ pmap_page_protect(pa, prot)
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PROTECT)) ||
prot == VM_PROT_NONE && (pmapdebug & PDB_REMOVE))
printf("pmap_page_protect(%x, %x)\n", pa, prot);
(prot == VM_PROT_NONE && (pmapdebug & PDB_REMOVE)))
printf("pmap_page_protect(%lx, %x)\n", pa, prot);
#endif
if (pa < vm_first_phys || pa >= vm_last_phys)
return;
@ -996,7 +996,7 @@ pmap_page_protect(pa, prot)
pv = pv->pv_next;
#ifdef DEBUG
if (pmapdebug & PDB_PARANOIA)
printf("%s wired mapping for %x not removed\n",
printf("%s wired mapping for %lx not removed\n",
"pmap_page_protect:", pa);
#endif
}
@ -1021,7 +1021,7 @@ pmap_protect(pmap, sva, eva, prot)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_PROTECT))
printf("pmap_protect(%x, %x, %x, %x)\n", pmap, sva, eva, prot);
printf("pmap_protect(%p, %lx, %lx, %x)\n", pmap, sva, eva, prot);
#endif
if (pmap == NULL)
@ -1143,7 +1143,7 @@ pmap_enter(pmap, va, pa, prot, wired)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER))
printf("pmap_enter(%x, %x, %x, %x, %x)\n",
printf("pmap_enter(%p, %lx, %lx, %x, %x)\n",
pmap, va, pa, prot, wired);
#endif
if (pmap == NULL)
@ -1173,7 +1173,7 @@ pmap_enter(pmap, va, pa, prot, wired)
opa = pmap_pte_pa(pte);
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
printf("enter: pte %x, *pte %x\n", pte, *pte);
printf("enter: pte %p, *pte %x\n", pte, *pte);
#endif
/*
@ -1225,7 +1225,7 @@ pmap_enter(pmap, va, pa, prot, wired)
if (opa) {
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
printf("enter: removing old mapping %x\n", va);
printf("enter: removing old mapping %lx\n", va);
#endif
pmap_remove_mapping(pmap, va, pte, PRM_TFLUSH|PRM_CFLUSH);
#ifdef PMAPSTATS
@ -1258,7 +1258,7 @@ pmap_enter(pmap, va, pa, prot, wired)
s = splimp();
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
printf("enter: pv at %x: %x/%x/%x\n",
printf("enter: pv at %p: %lx/%p/%p\n",
pv, pv->pv_va, pv->pv_pmap, pv->pv_next);
#endif
/*
@ -1324,7 +1324,7 @@ pmap_enter(pmap, va, pa, prot, wired)
if (pv->pv_flags & PV_CI) {
#ifdef DEBUG
if (pmapdebug & PDB_CACHE)
printf("enter: pa %x already CI'ed\n",
printf("enter: pa %lx already CI'ed\n",
pa);
#endif
checkpv = cacheable = FALSE;
@ -1336,7 +1336,7 @@ pmap_enter(pmap, va, pa, prot, wired)
(va & pmap_aliasmask)))) {
#ifdef DEBUG
if (pmapdebug & PDB_CACHE)
printf("enter: pa %x CI'ing all\n",
printf("enter: pa %lx CI'ing all\n",
pa);
#endif
cacheable = FALSE;
@ -1464,7 +1464,7 @@ pmap_change_wiring(pmap, va, wired)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_change_wiring(%x, %x, %x)\n", pmap, va, wired);
printf("pmap_change_wiring(%p, %lx, %x)\n", pmap, va, wired);
#endif
if (pmap == NULL)
return;
@ -1478,7 +1478,7 @@ pmap_change_wiring(pmap, va, wired)
*/
if (!pmap_ste_v(pmap, va)) {
if (pmapdebug & PDB_PARANOIA)
printf("pmap_change_wiring: invalid STE for %x\n", va);
printf("pmap_change_wiring: invalid STE for %lx\n", va);
return;
}
/*
@ -1487,7 +1487,7 @@ pmap_change_wiring(pmap, va, wired)
*/
if (!pmap_pte_v(pte)) {
if (pmapdebug & PDB_PARANOIA)
printf("pmap_change_wiring: invalid PTE for %x\n", va);
printf("pmap_change_wiring: invalid PTE for %lx\n", va);
}
#endif
/*
@ -1520,7 +1520,7 @@ pmap_extract(pmap, va)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract(%x, %x) -> ", pmap, va);
printf("pmap_extract(%p, %lx) -> ", pmap, va);
#endif
pa = 0;
if (pmap && pmap_ste_v(pmap, va))
@ -1529,7 +1529,7 @@ pmap_extract(pmap, va)
pa = (pa & PG_FRAME) | (va & ~PG_FRAME);
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("%x\n", pa);
printf("%lx\n", pa);
#endif
return(pa);
}
@ -1550,7 +1550,7 @@ void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_copy(%x, %x, %x, %x, %x)\n",
printf("pmap_copy(%p, %p, %lx, %lx, %lx)\n",
dst_pmap, src_pmap, dst_addr, len, src_addr);
#endif
}
@ -1595,14 +1595,14 @@ pmap_collect(pmap)
#ifdef DEBUG
st_entry_t *ste;
int opmapdebug;
int opmapdebug = 0 /* XXX initialize to quiet gcc -Wall */;
#endif
if (pmap != pmap_kernel())
return;
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_collect(%x)\n", pmap);
printf("pmap_collect(%p)\n", pmap);
#endif
#ifdef PMAPSTATS
kpt_stats.collectscans++;
@ -1642,7 +1642,7 @@ ok:
#ifdef DEBUG
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT)) {
printf("collect: freeing KPT page at %x (ste %x@%x)\n",
printf("collect: freeing KPT page at %lx (ste %x@%p)\n",
pv->pv_va, *pv->pv_ptste, pv->pv_ptste);
opmapdebug = pmapdebug;
pmapdebug |= PDB_PTPAGE;
@ -1672,7 +1672,7 @@ ok:
if (kpt == (struct kpt_page *)0)
panic("pmap_collect: lost a KPT page");
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT))
printf("collect: %x (%x) to free list\n",
printf("collect: %lx (%lx) to free list\n",
kpt->kpt_va, kpa);
#endif
*pkpt = kpt->kpt_next;
@ -1687,11 +1687,11 @@ ok:
pmapdebug = opmapdebug;
if (*ste != SG_NV)
printf("collect: kernel STE at %x still valid (%x)\n",
printf("collect: kernel STE at %p still valid (%x)\n",
ste, *ste);
ste = &Sysptmap[ste - pmap_ste(pmap_kernel(), 0)];
if (*ste != SG_NV)
printf("collect: kernel PTmap at %x still valid (%x)\n",
printf("collect: kernel PTmap at %p still valid (%x)\n",
ste, *ste);
#endif
}
@ -1719,7 +1719,7 @@ pmap_zero_page(phys)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_zero_page(%x)\n", phys);
printf("pmap_zero_page(%lx)\n", phys);
#endif
kva = (vm_offset_t) CADDR1;
pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE);
@ -1750,7 +1750,7 @@ pmap_copy_page(src, dst)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_copy_page(%x, %x)\n", src, dst);
printf("pmap_copy_page(%lx, %lx)\n", src, dst);
#endif
skva = (vm_offset_t) CADDR1;
dkva = (vm_offset_t) CADDR2;
@ -1783,7 +1783,7 @@ pmap_pageable(pmap, sva, eva, pageable)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_pageable(%x, %x, %x, %x)\n",
printf("pmap_pageable(%p, %lx, %lx, %x)\n",
pmap, sva, eva, pageable);
#endif
/*
@ -1800,7 +1800,7 @@ pmap_pageable(pmap, sva, eva, pageable)
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PTPAGE)) == PDB_PTPAGE)
printf("pmap_pageable(%x, %x, %x, %x)\n",
printf("pmap_pageable(%p, %lx, %lx, %x)\n",
pmap, sva, eva, pageable);
#endif
if (!pmap_ste_v(pmap, sva))
@ -1813,7 +1813,7 @@ pmap_pageable(pmap, sva, eva, pageable)
return;
#ifdef DEBUG
if (pv->pv_va != sva || pv->pv_next) {
printf("pmap_pageable: bad PT page va %x next %x\n",
printf("pmap_pageable: bad PT page va %lx next %p\n",
pv->pv_va, pv->pv_next);
return;
}
@ -1824,12 +1824,12 @@ pmap_pageable(pmap, sva, eva, pageable)
pmap_changebit(pa, PG_M, FALSE);
#ifdef DEBUG
if ((PHYS_TO_VM_PAGE(pa)->flags & PG_CLEAN) == 0) {
printf("pa %x: flags=%x: not clean\n",
printf("pa %lx: flags=%x: not clean\n",
pa, PHYS_TO_VM_PAGE(pa)->flags);
PHYS_TO_VM_PAGE(pa)->flags |= PG_CLEAN;
}
if (pmapdebug & PDB_PTPAGE)
printf("pmap_pageable: PT page %x(%x) unmodified\n",
printf("pmap_pageable: PT page %lx(%x) unmodified\n",
sva, *pmap_pte(pmap, sva));
if (pmapdebug & PDB_WIRING)
pmap_check_wiring("pageable", sva);
@ -1847,7 +1847,7 @@ pmap_clear_modify(pa)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_clear_modify(%x)\n", pa);
printf("pmap_clear_modify(%lx)\n", pa);
#endif
pmap_changebit(pa, PG_M, FALSE);
}
@ -1863,7 +1863,7 @@ void pmap_clear_reference(pa)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_clear_reference(%x)\n", pa);
printf("pmap_clear_reference(%lx)\n", pa);
#endif
pmap_changebit(pa, PG_U, FALSE);
}
@ -1882,7 +1882,7 @@ pmap_is_referenced(pa)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
boolean_t rv = pmap_testbit(pa, PG_U);
printf("pmap_is_referenced(%x) -> %c\n", pa, "FT"[rv]);
printf("pmap_is_referenced(%lx) -> %c\n", pa, "FT"[rv]);
return(rv);
}
#endif
@ -1903,7 +1903,7 @@ pmap_is_modified(pa)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
boolean_t rv = pmap_testbit(pa, PG_M);
printf("pmap_is_modified(%x) -> %c\n", pa, "FT"[rv]);
printf("pmap_is_modified(%lx) -> %c\n", pa, "FT"[rv]);
return(rv);
}
#endif
@ -1936,10 +1936,10 @@ pmap_mapmulti(pmap, va)
#ifdef DEBUG
if (pmapdebug & PDB_MULTIMAP) {
ste = pmap_ste(pmap, HPMMBASEADDR(va));
printf("pmap_mapmulti(%x, %x): bste %x(%x)",
printf("pmap_mapmulti(%p, %lx): bste %p(%x)",
pmap, va, ste, *ste);
ste = pmap_ste(pmap, va);
printf(" ste %x(%x)\n", ste, *ste);
printf(" ste %p(%x)\n", ste, *ste);
}
#endif
bste = pmap_ste(pmap, HPMMBASEADDR(va));
@ -1980,7 +1980,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
pt_entry_t opte;
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
printf("pmap_remove_mapping(%x, %x, %x, %x)\n",
printf("pmap_remove_mapping(%p, %lx, %p, %x)\n",
pmap, va, pte, flags);
#endif
@ -2034,7 +2034,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
*/
#ifdef DEBUG
if (pmapdebug & PDB_REMOVE)
printf("remove: invalidating pte at %x\n", pte);
printf("remove: invalidating pte at %p\n", pte);
#endif
bits = *pte & (PG_U|PG_M);
*pte = PG_NV;
@ -2113,7 +2113,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
pv->pv_pmap && pv->pv_next == NULL && (pv->pv_flags & PV_CI)) {
#ifdef DEBUG
if (pmapdebug & PDB_CACHE)
printf("remove: clearing CI for pa %x\n", pa);
printf("remove: clearing CI for pa %lx\n", pa);
#endif
pv->pv_flags &= ~PV_CI;
pmap_changebit(pa, PG_CI, FALSE);
@ -2134,7 +2134,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
#endif
#ifdef DEBUG
if (pmapdebug & (PDB_REMOVE|PDB_PTPAGE))
printf("remove: ste was %x@%x pte was %x@%x\n",
printf("remove: ste was %x@%p pte was %x@%p\n",
*ste, ste, opte, pmap_pte(pmap, va));
#endif
#if defined(M68040)
@ -2157,7 +2157,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
if (ptpmap != pmap_kernel()) {
#ifdef DEBUG
if (pmapdebug & (PDB_REMOVE|PDB_SEGTAB))
printf("remove: stab %x, refcnt %d\n",
printf("remove: stab %p, refcnt %d\n",
ptpmap->pm_stab, ptpmap->pm_sref - 1);
if ((pmapdebug & PDB_PARANOIA) &&
ptpmap->pm_stab != (st_entry_t *)trunc_page(ste))
@ -2166,7 +2166,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
if (--(ptpmap->pm_sref) == 0) {
#ifdef DEBUG
if (pmapdebug&(PDB_REMOVE|PDB_SEGTAB))
printf("remove: free stab %x\n",
printf("remove: free stab %p\n",
ptpmap->pm_stab);
#endif
kmem_free_wakeup(st_map,
@ -2277,7 +2277,7 @@ pmap_changebit(pa, bit, setem)
#ifdef DEBUG
if (pmapdebug & PDB_BITS)
printf("pmap_changebit(%x, %x, %s)\n",
printf("pmap_changebit(%lx, %x, %s)\n",
pa, bit, setem ? "set" : "clear");
#endif
if (pa < vm_first_phys || pa >= vm_last_phys)
@ -2397,7 +2397,7 @@ pmap_enter_ptpage(pmap, va)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER|PDB_PTPAGE))
printf("pmap_enter_ptpage: pmap %x, va %x\n", pmap, va);
printf("pmap_enter_ptpage: pmap %p, va %lx\n", pmap, va);
#endif
#ifdef PMAPSTATS
enter_stats.ptpneeded++;
@ -2432,7 +2432,7 @@ pmap_enter_ptpage(pmap, va)
PMAP_ACTIVATE(pmap, &curproc->p_addr->u_pcb, 1);
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
printf("enter: pmap %x stab %x(%x)\n",
printf("enter: pmap %p stab %p(%p)\n",
pmap, pmap->pm_stab, pmap->pm_stpa);
#endif
}
@ -2457,7 +2457,7 @@ pmap_enter_ptpage(pmap, va)
*ste = (u_int)addr | SG_RW | SG_U | SG_V;
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
printf("enter: alloc ste2 %d(%x)\n", ix, addr);
printf("enter: alloc ste2 %d(%p)\n", ix, addr);
#endif
}
ste = pmap_ste2(pmap, va);
@ -2472,7 +2472,7 @@ pmap_enter_ptpage(pmap, va)
ste = (st_entry_t *)((int)ste & ~(NBPG/SG4_LEV3SIZE-1));
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
printf("enter: ste2 %x (%x)\n",
printf("enter: ste2 %p (%p)\n",
pmap_ste2(pmap, va), ste);
#endif
}
@ -2515,7 +2515,7 @@ pmap_enter_ptpage(pmap, va)
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE)) {
int ix = pmap_ste(pmap, va) - pmap_ste(pmap, 0);
printf("enter: add &Sysptmap[%d]: %x (KPT page %x)\n",
printf("enter: add &Sysptmap[%d]: %x (KPT page %lx)\n",
ix, Sysptmap[ix], kpt->kpt_va);
}
#endif
@ -2533,7 +2533,7 @@ pmap_enter_ptpage(pmap, va)
pmap->pm_sref++;
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
printf("enter: about to fault UPT pg at %x\n", va);
printf("enter: about to fault UPT pg at %lx\n", va);
#endif
s = vm_fault(pt_map, va, VM_PROT_READ|VM_PROT_WRITE, FALSE);
if (s != KERN_SUCCESS) {
@ -2563,7 +2563,7 @@ pmap_enter_ptpage(pmap, va)
#ifdef DEBUG
pt_entry_t *pte = pmap_pte(pmap_kernel(), va);
if ((pmapdebug & PDB_PARANOIA) && (*pte & PG_CCB) == 0)
printf("%s PT no CCB: kva=%x ptpa=%x pte@%x=%x\n",
printf("%s PT no CCB: kva=%lx ptpa=%lx pte@%p=%x\n",
pmap == pmap_kernel() ? "Kernel" : "User",
va, ptpa, pte, *pte);
#endif
@ -2592,7 +2592,7 @@ pmap_enter_ptpage(pmap, va)
pv->pv_ptpmap = pmap;
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
printf("enter: new PT page at PA %x, ste at %x\n", ptpa, ste);
printf("enter: new PT page at PA %lx, ste at %p\n", ptpa, ste);
#endif
/*
@ -2617,7 +2617,7 @@ pmap_enter_ptpage(pmap, va)
if (pmap != pmap_kernel()) {
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
printf("enter: stab %x refcnt %d\n",
printf("enter: stab %p refcnt %d\n",
pmap->pm_stab, pmap->pm_sref);
#endif
}
@ -2642,9 +2642,9 @@ pmap_pvdump(pa)
{
struct pv_entry *pv;
printf("pa %x", pa);
printf("pa %lx", pa);
for (pv = pa_to_pvh(pa); pv; pv = pv->pv_next)
printf(" -> pmap %x, va %x, ptste %x, ptpmap %x, flags %x",
printf(" -> pmap %p, va %lx, ptste %p, ptpmap %p, flags %x",
pv->pv_pmap, pv->pv_va, pv->pv_ptste, pv->pv_ptpmap,
pv->pv_flags);
printf("\n");
@ -2666,7 +2666,7 @@ pmap_check_wiring(str, va)
return;
if (!vm_map_lookup_entry(pt_map, va, &entry)) {
printf("wired_check: entry for %x not found\n", va);
printf("wired_check: entry for %lx not found\n", va);
return;
}
count = 0;
@ -2674,7 +2674,7 @@ pmap_check_wiring(str, va)
if (*pte)
count++;
if (entry->wired_count != count)
printf("*%s*: %x: w%d/a%d\n",
printf("*%s*: %lx: w%d/a%d\n",
str, va, entry->wired_count, count);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.49 1997/04/01 03:12:31 scottr Exp $ */
/* $NetBSD: trap.c,v 1.50 1997/04/02 22:41:41 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -67,6 +67,8 @@
#include <vm/vm.h>
#include <vm/pmap.h>
#include <dev/cons.h>
#ifdef COMPAT_HPUX
#include <compat/hpux/hpux.h>
extern struct emul emul_hpux;
@ -601,7 +603,7 @@ trap(type, code, v, frame)
rv = vm_fault(map, va, ftype, FALSE);
#ifdef DEBUG
if (rv && MDB_ISPID(p->p_pid))
printf("vm_fault(%x, %x, %x, 0) -> %x\n",
printf("vm_fault(%p, %lx, %x, 0) -> %x\n",
map, va, ftype, rv);
#endif
/*
@ -947,7 +949,7 @@ dumpwb(num, s, a, d)
if (pa == 0)
printf("<invalid address>");
else
printf("%x, current value %x", pa, fuword((caddr_t)a));
printf("%lx, current value %lx", pa, fuword((caddr_t)a));
printf("\n");
}
#endif