diff options
Diffstat (limited to 'sys')
77 files changed, 289 insertions, 274 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c index 2e0dbec03da..e41fb68b0b3 100644 --- a/sys/arch/alpha/alpha/disksubr.c +++ b/sys/arch/alpha/alpha/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.74 2007/06/06 16:42:01 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.75 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -208,7 +208,7 @@ readdoslabel(struct buf *bp, void (*strat)(struct buf *), struct partition *pp; unsigned long extoff = 0; unsigned int fattest; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index d130bc4bea8..b90acefc027 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.109 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.110 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -1152,7 +1152,7 @@ cpu_dump_mempagecnt() int cpu_dump() { - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); char buf[dbtob(1)]; kcore_seg_t *segp; cpu_kcore_hdr_t *cpuhdrp; @@ -1236,8 +1236,8 @@ dumpsys() u_long totalbytesleft, bytes, i, n, memcl; u_long maddr; int psize; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int error; extern int msgbufmapped; diff --git a/sys/arch/alpha/stand/installboot.c b/sys/arch/alpha/stand/installboot.c index 65f15260e7f..6ee4487ef65 100644 --- a/sys/arch/alpha/stand/installboot.c +++ b/sys/arch/alpha/stand/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.13 2005/08/01 05:01:35 deraadt Exp $ */ +/* $OpenBSD: installboot.c,v 1.14 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */ /* @@ -92,7 +92,7 @@ main(int argc, char *argv[]) long protosize; struct stat disksb, bootsb; struct disklabel dl; - unsigned long partoffset; + daddr64_t partoffset; #define BBPAD 0x1e0 struct bb { char bb_pad[BBPAD]; /* disklabel lives in here, actually */ @@ -165,8 +165,8 @@ main(int argc, char *argv[]) * into the disk. If disklabels not supported, assume zero. */ if (ioctl(devfd, DIOCGDINFO, &dl) != -1) { - partoffset = dl.d_partitions[minor(bootsb.st_dev) % - getmaxpartitions()].p_offset; + partoffset = DL_GETPOFFSET(&dl.d_partitions[minor(bootsb.st_dev) % + getmaxpartitions()]); } else { if (errno != ENOTTY) err(1, "read disklabel: %s", dev); diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c index 47e36a46727..63b91cd1244 100644 --- a/sys/arch/amd64/amd64/disksubr.c +++ b/sys/arch/amd64/amd64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.38 2007/06/06 16:42:03 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.39 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -76,7 +76,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; dev_t devno; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index ac74697d2ea..f1aa836c45d 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.58 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.59 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -815,7 +815,7 @@ long dumplo = 0; /* blocks */ int cpu_dump(void) { - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); char buf[dbtob(1)]; kcore_seg_t *segp; cpu_kcore_hdr_t *cpuhdrp; @@ -908,8 +908,8 @@ dumpsys(void) { u_long totalbytesleft, bytes, i, n, memseg; u_long maddr; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int error; /* Save registers. */ diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c index 2e7b9b3024e..99d54ca7060 100644 --- a/sys/arch/arm/arm/disksubr.c +++ b/sys/arch/arm/arm/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.33 2007/06/06 16:42:04 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.34 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -69,7 +69,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/arm/arm/stubs.c b/sys/arch/arm/arm/stubs.c index 7565e137d38..d1654a45bb7 100644 --- a/sys/arch/arm/arm/stubs.c +++ b/sys/arch/arm/arm/stubs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stubs.c,v 1.4 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: stubs.c,v 1.5 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: stubs.c,v 1.14 2003/07/15 00:24:42 lukem Exp $ */ /* @@ -124,7 +124,7 @@ void dumpsys() { const struct bdevsw *bdev; - daddr_t blkno; + daddr64_t blkno; int psize; int error; int addr; diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c index 02f6b44b5d7..88fb632e334 100644 --- a/sys/arch/aviion/aviion/disksubr.c +++ b/sys/arch/aviion/aviion/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.24 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.25 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -69,7 +69,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index 55ed1f2843d..4676e19f088 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.9 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.10 2007/06/06 17:15:11 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -458,9 +458,9 @@ dumpsys() { int maj; int psize; - daddr_t blkno; /* current block to write */ + daddr64_t blkno; /* current block to write */ /* dump routine */ - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int pg; /* page being dumped */ paddr_t maddr; /* PA being dumped */ int error; /* error code from (*dump)() */ diff --git a/sys/arch/hp300/dev/ct.c b/sys/arch/hp300/dev/ct.c index 26ed0837b65..b6577c31318 100644 --- a/sys/arch/hp300/dev/ct.c +++ b/sys/arch/hp300/dev/ct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ct.c,v 1.17 2007/03/13 19:44:53 miod Exp $ */ +/* $OpenBSD: ct.c,v 1.18 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: ct.c,v 1.21 1997/04/02 22:37:23 scottr Exp $ */ /* @@ -927,7 +927,7 @@ ctioctl(dev, cmd, data, flag, p) int ctdump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 0113225da01..8e577a1ea97 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.48 2007/06/05 00:38:14 deraadt Exp $ */ +/* $OpenBSD: hd.c,v 1.49 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -1015,7 +1015,7 @@ hderror(unit) struct hd_softc *rs = hd_cd.cd_devs[unit]; struct hd_stat *sp; struct buf *bp; - daddr_t hwbn, pbn; + daddr64_t hwbn, pbn; if (hdstatus(rs)) { #ifdef DEBUG @@ -1214,7 +1214,7 @@ exit: return (error); } -int +daddr64_t hdsize(dev) dev_t dev; { @@ -1283,13 +1283,13 @@ static int hddoingadump; /* simple mutex */ int hddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { int sectorsize; /* size of a disk sector */ - int nsects; /* number of sectors in partition */ - int sectoff; /* sector offset of partition */ + daddr64_t nsects; /* number of sectors in partition */ + daddr64_t sectoff; /* sector offset of partition */ int totwrt; /* total number of sectors left to write */ int nwrt; /* current number of sectors to write */ int unit, part; diff --git a/sys/arch/hp300/dev/mt.c b/sys/arch/hp300/dev/mt.c index 1d2d00bffd1..39f35576a9b 100644 --- a/sys/arch/hp300/dev/mt.c +++ b/sys/arch/hp300/dev/mt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mt.c,v 1.17 2006/01/20 23:27:25 miod Exp $ */ +/* $OpenBSD: mt.c,v 1.18 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: mt.c,v 1.8 1997/03/31 07:37:29 scottr Exp $ */ /* @@ -988,7 +988,7 @@ mtioctl(dev, cmd, data, flag, p) int mtdump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 0feb6c02e46..67f3611ad3d 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.114 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.115 2007/06/06 17:15:11 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -757,9 +757,9 @@ dumpconf(void) void dumpsys() { - daddr_t blkno; /* current block to write */ + daddr64_t blkno; /* current block to write */ /* dump routine */ - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int pg; /* page being dumped */ paddr_t maddr; /* PA being dumped */ int error; /* error code from (*dump)() */ diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index 75d0aafe7d5..ef1b35c1c32 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.54 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.55 2007/06/06 17:15:11 deraadt Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -211,7 +211,7 @@ readdoslabel(struct buf *bp, void (*strat)(struct buf *), struct partition *pp; unsigned long extoff = 0; unsigned int fattest; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 3548ac24a78..5cedb131f08 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.157 2007/05/27 17:31:56 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.158 2007/06/06 17:15:11 deraadt Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -1047,10 +1047,10 @@ void dumpsys(void) { int psize, bytes, i, n; - register caddr_t maddr; - register daddr_t blkno; - register int (*dump)(dev_t, daddr_t, caddr_t, size_t); - register int error; + caddr_t maddr; + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); + int error; /* Save registers savectx(&dumppcb); */ diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c index 37f6050133c..6fd42238d63 100644 --- a/sys/arch/hppa64/hppa64/disksubr.c +++ b/sys/arch/hppa64/hppa64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.37 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.38 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -211,7 +211,7 @@ readdoslabel(struct buf *bp, void (*strat)(struct buf *), struct partition *pp; unsigned long extoff = 0; unsigned int fattest; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c index 70c7c882c33..1f5d478681b 100644 --- a/sys/arch/hppa64/hppa64/machdep.c +++ b/sys/arch/hppa64/hppa64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.6 2007/05/27 17:31:56 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.7 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -747,10 +747,10 @@ void dumpsys(void) { int psize, bytes, i, n; - register caddr_t maddr; - register daddr_t blkno; - register int (*dump)(dev_t, daddr_t, caddr_t, size_t); - register int error; + caddr_t maddr; + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); + int error; /* Save registers savectx(&dumppcb); */ diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index ef955d27a98..206453d5da6 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.78 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.79 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -76,7 +76,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; dev_t devno; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 8d24c76d5a6..2db15f2b8fd 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.400 2007/06/04 06:57:56 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.401 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2493,7 +2493,7 @@ dumpconf(void) int cpu_dump() { - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); long buf[dbtob(1) / sizeof (long)]; kcore_seg_t *segp; @@ -2530,8 +2530,8 @@ dumpsys() { u_int i, j, npg; int maddr; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int error; char *str; extern int msgbufmapped; @@ -2574,7 +2574,7 @@ dumpsys() maddr = ctob(dumpmem[i].start); blkno = dumplo + btodb(maddr) + 1; #if 0 - printf("(%d %ld %d) ", maddr, blkno, npg); + printf("(%d %lld %d) ", maddr, blkno, npg); #endif for (j = npg; j--; maddr += NBPG, blkno += btodb(NBPG)) { @@ -2583,7 +2583,7 @@ dumpsys() printf("%d ", (ctob(dumpsize) - maddr) / (1024 * 1024)); #if 0 - printf("(%x %d) ", maddr, blkno); + printf("(%x %lld) ", maddr, blkno); #endif pmap_enter(pmap_kernel(), dumpspace, maddr, VM_PROT_READ, PMAP_WIRED); diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index 74f6161b793..4306b2d09b0 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.21 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.22 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -69,7 +69,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c index ed7e19d7ed7..b16721fce55 100644 --- a/sys/arch/landisk/landisk/machdep.c +++ b/sys/arch/landisk/landisk/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.12 2007/04/29 18:18:03 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.13 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /*- @@ -385,7 +385,7 @@ InitializeBsc(void) * Dump the machine-dependent dump header. */ u_int -cpu_dump(int (*dump)(dev_t, daddr_t, caddr_t, size_t), daddr_t *blknop) +cpu_dump(int (*dump)(dev_t, daddr64_t, caddr_t, size_t), daddr64_t *blknop) { extern cpu_kcore_hdr_t cpu_kcore_hdr; char buf[dbtob(1)]; diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index 66f0ecfdf75..0a40e973bd7 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.43 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.44 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -649,9 +649,9 @@ dumpsys() { int maj; int psize; - daddr_t blkno; /* current block to write */ + daddr64_t blkno; /* current block to write */ /* dump routine */ - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int pg; /* page being dumped */ paddr_t maddr; /* PA being dumped */ int error; /* error code from (*dump)() */ diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index 5c9ddc062cb..a05ea981947 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.140 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.141 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */ /* @@ -214,7 +214,7 @@ u_long get_physical(u_int, u_long *); caddr_t allocsys(caddr_t); void initcpu(void); int cpu_dumpsize(void); -int cpu_dump(int (*)(dev_t, daddr_t, caddr_t, size_t), daddr_t *); +int cpu_dump(int (*)(dev_t, daddr64_t, caddr_t, size_t), daddr64_t *); void cpu_init_kcore_hdr(void); int fpu_probe(void); @@ -654,8 +654,8 @@ cpu_dumpsize() */ int cpu_dump(dump, blknop) - int (*dump)(dev_t, daddr_t, caddr_t, size_t); - daddr_t *blknop; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); + daddr64_t *blknop; { int buf[dbtob(1) / sizeof(int)]; cpu_kcore_hdr_t *chdr; @@ -723,9 +723,9 @@ void dumpsys() { cpu_kcore_hdr_t *h = &cpu_kcore_hdr; - daddr_t blkno; /* current block to write */ + daddr64_t blkno; /* current block to write */ /* dump routine */ - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int pg; /* page being dumped */ vaddr_t maddr; /* PA being dumped */ int seg; /* RAM segment being dumped */ diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index c4792457d20..fccd1135086 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.43 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.44 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -72,7 +72,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; char *s; int dospartoff, cyl, i, ourpart = -1; diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index a287c034ca5..ba5be68cfda 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.92 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.93 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -779,7 +779,7 @@ int cpu_dump(void); int cpu_dump() { - int (*dump) (dev_t, daddr_t, caddr_t, size_t); + int (*dump) (dev_t, daddr64_t, caddr_t, size_t); long buf[dbtob(1) / sizeof (long)]; kcore_seg_t *segp; @@ -802,8 +802,8 @@ dumpsys() #if 0 u_int npg; u_int i, j; - daddr_t blkno; - int (*dump) (dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump) (dev_t, daddr64_t, caddr_t, size_t); char *str; int maddr; extern int msgbufmapped; diff --git a/sys/arch/macppc/stand/ofdev.c b/sys/arch/macppc/stand/ofdev.c index 6ab2517727a..6130b465c17 100644 --- a/sys/arch/macppc/stand/ofdev.c +++ b/sys/arch/macppc/stand/ofdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofdev.c,v 1.11 2007/06/02 15:28:09 deraadt Exp $ */ +/* $OpenBSD: ofdev.c,v 1.12 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: ofdev.c,v 1.1 1997/04/16 20:29:20 thorpej Exp $ */ /* @@ -98,7 +98,7 @@ filename(char *str, char *ppart) } static int -strategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf, +strategy(void *devdata, int rw, daddr64_t blk, size_t size, void *buf, size_t *rsize) { struct of_dev *dev = devdata; diff --git a/sys/arch/mips64/mips64/disksubr.c b/sys/arch/mips64/mips64/disksubr.c index dd82015753a..80cd0166b5a 100644 --- a/sys/arch/mips64/mips64/disksubr.c +++ b/sys/arch/mips64/mips64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.43 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.44 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -221,7 +221,7 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, spoofonly) struct partition *pp; unsigned long extoff = 0; unsigned int fattest; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 678fcf0b11c..335be2eda67 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.105 2007/05/29 20:36:47 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.106 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -603,9 +603,9 @@ dumpsys() { int maj; int psize; - daddr_t blkno; /* current block to write */ + daddr64_t blkno; /* current block to write */ /* dump routine */ - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int pg; /* page being dumped */ paddr_t maddr; /* PA being dumped */ int error; /* error code from (*dump)() */ diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 0b596a9f5ab..c743056aafa 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.191 2007/05/29 20:36:48 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.192 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -572,9 +572,9 @@ dumpsys() { int maj; int psize; - daddr_t blkno; /* current block to write */ + daddr64_t blkno; /* current block to write */ /* dump routine */ - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int pg; /* page being dumped */ paddr_t maddr; /* PA being dumped */ int error; /* error code from (*dump)() */ diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c index bef2fa99d68..9b8f5736100 100644 --- a/sys/arch/mvmeppc/mvmeppc/disksubr.c +++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.39 2007/06/06 16:42:06 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.40 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -72,7 +72,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), unsigned long extoff = 0; unsigned int fattest; struct buf *bp = NULL; - daddr_t part_blkno = DOSBBSECTOR; + daddr64_t part_blkno = DOSBBSECTOR; char *msg = NULL; int dospartoff, cyl, i, ourpart = -1; int wander = 1, n = 0, loop = 0; diff --git a/sys/arch/sh/include/cpu.h b/sys/arch/sh/include/cpu.h index 7d2fa1a539e..b29d7247ce0 100644 --- a/sys/arch/sh/include/cpu.h +++ b/sys/arch/sh/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.9 2007/05/14 07:05:49 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.10 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.41 2006/01/21 04:24:12 uwe Exp $ */ /*- @@ -210,7 +210,7 @@ void savectx(struct pcb *); struct fpreg; void fpu_save(struct fpreg *); void fpu_restore(struct fpreg *); -u_int cpu_dump(int (*)(dev_t, daddr_t, caddr_t, size_t), daddr_t *); +u_int cpu_dump(int (*)(dev_t, daddr64_t, caddr_t, size_t), daddr64_t *); u_int cpu_dumpsize(void); void dumpconf(void); void dumpsys(void); diff --git a/sys/arch/sh/sh/sh_machdep.c b/sys/arch/sh/sh/sh_machdep.c index fbb17be337b..d81017ac0f1 100644 --- a/sys/arch/sh/sh/sh_machdep.c +++ b/sys/arch/sh/sh/sh_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sh_machdep.c,v 1.15 2007/05/29 20:36:48 deraadt Exp $ */ +/* $OpenBSD: sh_machdep.c,v 1.16 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: sh3_machdep.c,v 1.59 2006/03/04 01:13:36 uwe Exp $ */ /* @@ -403,8 +403,8 @@ void dumpsys() { cpu_kcore_hdr_t *h = &cpu_kcore_hdr; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); u_int page = 0; paddr_t dumppa; u_int seg; diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index 39205876b29..75abaf79f40 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.50 2007/06/05 00:38:18 deraadt Exp $ */ +/* $OpenBSD: fd.c,v 1.51 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */ /*- @@ -208,7 +208,7 @@ struct fd_softc { struct fd_type *sc_deftype; /* default type descriptor */ struct fd_type *sc_type; /* current type descriptor */ - daddr_t sc_blkno; /* starting block number */ + daddr64_t sc_blkno; /* starting block number */ int sc_bcount; /* byte count left */ int sc_skip; /* bytes already transferred */ int sc_nblks; /* number of blocks currently transferring */ @@ -1750,7 +1750,7 @@ fdsize(dev) int fddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index 8fa71113b39..ddbd32f56e4 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.9 2007/06/05 00:38:18 deraadt Exp $ */ +/* $OpenBSD: presto.c,v 1.10 2007/06/06 17:15:12 deraadt Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -174,7 +174,7 @@ presto_attach(struct device *parent, struct device *self, void *args) */ int -prestodump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +prestodump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* * A dump to nvram is theoretically possible, but its size is diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index 41683456a49..14e9c94d38f 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.36 2007/06/05 00:38:18 deraadt Exp $ */ +/* $OpenBSD: xd.c,v 1.37 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -780,7 +780,7 @@ xdclose(dev, flag, fmt, p) int xddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { @@ -1410,8 +1410,9 @@ xdc_startbuf(xdcsc, xdsc, bp) } partno = DISKPART(bp->b_dev); #ifdef XDC_DEBUG - printf("xdc_startbuf: %s%c: %s block %d\n", xdsc->sc_dev.dv_xname, - 'a' + partno, (bp->b_flags & B_READ) ? "read" : "write", bp->b_blkno); + printf("xdc_startbuf: %s%c: %s block %lld\n", + xdsc->sc_dev.dv_xname, 'a' + partno, + (bp->b_flags & B_READ) ? "read" : "write", bp->b_blkno); printf("xdc_startbuf: b_bcount %d, b_data 0x%x\n", bp->b_bcount, bp->b_data); #endif diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index f860780ff4c..397193cc322 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.32 2007/06/05 00:38:18 deraadt Exp $ */ +/* $OpenBSD: xy.c,v 1.33 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -741,7 +741,7 @@ xyclose(dev, flag, fmt, p) int xydump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { @@ -1255,7 +1255,7 @@ xyc_startbuf(xycsc, xysc, bp) int partno; struct xy_iorq *iorq; struct xy_iopb *iopb; - u_long block; + daddr64_t block; caddr_t dbuf; iorq = xysc->xyrq; @@ -1268,8 +1268,9 @@ xyc_startbuf(xycsc, xysc, bp) partno = DISKPART(bp->b_dev); #ifdef XYC_DEBUG - printf("xyc_startbuf: %s%c: %s block %d\n", xysc->sc_dev.dv_xname, - 'a' + partno, (bp->b_flags & B_READ) ? "read" : "write", bp->b_blkno); + printf("xyc_startbuf: %s%c: %s block %lld\n", + xysc->sc_dev.dv_xname, 'a' + partno, + (bp->b_flags & B_READ) ? "read" : "write", bp->b_blkno); printf("xyc_startbuf: b_bcount %d, b_data 0x%x\n", bp->b_bcount, bp->b_data); #endif diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h index b6586168a1c..8e0e2a94973 100644 --- a/sys/arch/sparc/include/pmap.h +++ b/sys/arch/sparc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.40 2005/04/17 18:47:48 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.41 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */ /* @@ -256,7 +256,7 @@ extern struct pmap kernel_pmap_store; #define PMAP_IOENC(io) (CPU_ISSUN4M ? PMAP_IOENC_SRMMU(io) : PMAP_IOENC_4(io)) int pmap_dumpsize(void); -int pmap_dumpmmu(int (*)(dev_t, daddr_t, caddr_t, size_t), daddr_t); +int pmap_dumpmmu(int (*)(dev_t, daddr64_t, caddr_t, size_t), daddr64_t); #define pmap_kernel() (&kernel_pmap_store) #define pmap_resident_count(pmap) pmap_count_ptes(pmap) diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 72a2514b88d..8cc6fe62ce2 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.112 2007/05/29 20:36:48 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.113 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -774,8 +774,8 @@ void dumpsys() { int psize; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int error = 0; struct memarr *mp; int nmem; diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 594b9784db7..5eceee1cffd 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.144 2006/06/26 22:23:03 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.145 2007/06/06 17:15:12 deraadt Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -6385,8 +6385,8 @@ pmap_dumpsize() */ int pmap_dumpmmu(dump, blkno) - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); { kcore_seg_t *ksegp; cpu_kcore_hdr_t *kcpup; diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c index a3c4990fcc6..aa1bf1a195d 100644 --- a/sys/arch/sparc64/dev/fd.c +++ b/sys/arch/sparc64/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.13 2007/06/05 00:38:19 deraadt Exp $ */ +/* $OpenBSD: fd.c,v 1.14 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */ /*- @@ -257,7 +257,7 @@ struct fd_softc { struct timeout sc_motoron_to; struct timeout sc_motoroff_to; - daddr_t sc_blkno; /* starting block number */ + daddr64_t sc_blkno; /* starting block number */ int sc_bcount; /* byte count left */ int sc_skip; /* bytes already transferred */ int sc_nblks; /* number of blocks currently transferring */ @@ -743,9 +743,9 @@ fdstrategy(bp) #ifdef FD_DEBUG if (fdc_debug > 1) - printf("fdstrategy: b_blkno %lld b_bcount %ld blkno %lld cylin %ld\n", - (long long)bp->b_blkno, bp->b_bcount, - (long long)fd->sc_blkno, bp->b_cylinder); + printf("fdstrategy: b_blkno %lld b_bcount %d blkno %lld cylin %d\n", + bp->b_blkno, bp->b_bcount, + fd->sc_blkno, bp->b_cylinder); #endif /* Queue transfer on drive, activate drive and controller if idle. */ @@ -1446,14 +1446,19 @@ loop: head = sec / type->sectrac; sec -= head * type->sectrac; #ifdef DIAGNOSTIC - {int block; - block = (fd->sc_cylin * type->heads + head) * type->sectrac + sec; - if (block != fd->sc_blkno) { - printf("fdcintr: block %d != blkno %d\n", block, (int)fd->sc_blkno); + { + daddr64_t block; + + block = (fd->sc_cylin * type->heads + head) * + type->sectrac + sec; + if (block != fd->sc_blkno) { + printf("fdcintr: block %lld != blkno %d\n", + block, (int)fd->sc_blkno); #if defined(FD_DEBUG) && defined(DDB) - Debugger(); + Debugger(); #endif - }} + } + } #endif read = bp->b_flags & B_READ; @@ -1580,7 +1585,7 @@ loop: bp->b_flags & B_READ ? "read failed" : "write failed"); printf("blkno %lld nblks %d nstat %d tc %d\n", - (long long)fd->sc_blkno, fd->sc_nblks, + fd->sc_blkno, fd->sc_nblks, fdc->sc_nstat, fdc->sc_tc); } #endif @@ -1802,7 +1807,7 @@ fdsize(dev) int fddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/sparc64/include/pmap.h b/sys/arch/sparc64/include/pmap.h index 95a39e51792..c1793a939b3 100644 --- a/sys/arch/sparc64/include/pmap.h +++ b/sys/arch/sparc64/include/pmap.h @@ -173,7 +173,7 @@ void pmap_bootstrap(u_long kernelstart, u_long kernelend, u_int numctx); /* SPARC specific? */ void pmap_redzone(void); int pmap_dumpsize(void); -int pmap_dumpmmu(int (*)(dev_t, daddr_t, caddr_t, size_t), daddr_t); +int pmap_dumpmmu(int (*)(dev_t, daddr64_t, caddr_t, size_t), daddr64_t); int pmap_pa_exists(paddr_t); struct proc; void switchexit(struct proc *); diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 0962d15882a..8eb3ef580aa 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.90 2007/05/29 20:36:48 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.91 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -822,8 +822,8 @@ void dumpsys() { int psize; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); int error = 0; struct mem_region *mp; extern struct mem_region *mem; @@ -864,7 +864,7 @@ dumpsys() error = pmap_dumpmmu(dump, blkno); blkno += pmap_dumpsize(); -printf("starting dump, blkno %d\n", blkno); +printf("starting dump, blkno %lld\n", blkno); for (mp = mem; mp->size; mp++) { u_int64_t i = 0, n; paddr_t maddr = mp->start; diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 9c7f49bdd3e..f014c7fe07b 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.41 2007/05/20 15:11:27 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.42 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -2294,8 +2294,8 @@ pmap_dumpsize() */ int pmap_dumpmmu(dump, blkno) - register daddr_t blkno; - register int (*dump)(dev_t, daddr_t, caddr_t, size_t); + register daddr64_t blkno; + register int (*dump)(dev_t, daddr64_t, caddr_t, size_t); { kcore_seg_t *kseg; cpu_kcore_hdr_t *kcpu; diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index e7c293a3ccc..454f35be0c0 100644 --- a/sys/arch/vax/mscp/mscp_disk.c +++ b/sys/arch/vax/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_disk.c,v 1.20 2007/06/05 00:38:19 deraadt Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.21 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -110,7 +110,7 @@ void rastrategy(struct buf *); int raread(dev_t, struct uio *); int rawrite(dev_t, struct uio *); int raioctl(dev_t, int, caddr_t, int, struct proc *); -int radump(dev_t, daddr_t, caddr_t, size_t); +int radump(dev_t, daddr64_t, caddr_t, size_t); int rasize(dev_t); int ra_putonline(struct ra_softc *); @@ -418,7 +418,7 @@ raioctl(dev, cmd, data, flag, p) int radump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { @@ -459,7 +459,7 @@ void rxstrategy(struct buf *); int rxread(dev_t, struct uio *); int rxwrite(dev_t, struct uio *); int rxioctl(dev_t, int, caddr_t, int, struct proc *); -int rxdump(dev_t, daddr_t, caddr_t, size_t); +int rxdump(dev_t, daddr64_t, caddr_t, size_t); int rxsize(dev_t); struct cfattach rx_ca = { @@ -730,7 +730,7 @@ rxioctl(dev, cmd, data, flag, p) int rxdump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { @@ -828,7 +828,7 @@ rronline(usc, mp) rx->ra_state = DK_OPEN; dl = rx->ra_disk.dk_label; - DL_SETDSIZE(dl, (daddr_t)mp->mscp_onle.onle_unitsize); + DL_SETDSIZE(dl, mp->mscp_onle.onle_unitsize); if (dl->d_secpercyl) { dl->d_ncylinders = DL_GETDSIZE(dl) / dl->d_secpercyl; diff --git a/sys/arch/vax/mscp/mscp_tape.c b/sys/arch/vax/mscp/mscp_tape.c index 5eb952fa3e8..d192564076b 100644 --- a/sys/arch/vax/mscp/mscp_tape.c +++ b/sys/arch/vax/mscp/mscp_tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_tape.c,v 1.9 2006/03/15 20:04:36 miod Exp $ */ +/* $OpenBSD: mscp_tape.c,v 1.10 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: mscp_tape.c,v 1.16 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -91,7 +91,7 @@ void mtstrategy(struct buf *); int mtread(dev_t, struct uio *); int mtwrite(dev_t, struct uio *); int mtioctl(dev_t, int, caddr_t, int, struct proc *); -int mtdump(dev_t, daddr_t, caddr_t, size_t); +int mtdump(dev_t, daddr64_t, caddr_t, size_t); int mtcmd(struct mt_softc *, int, int, int); void mtcmddone(struct device *, struct mscp *); int mt_putonline(struct mt_softc *); @@ -471,7 +471,7 @@ mtioctl(dev, cmd, data, flag, p) int mtdump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/vax/uba/ts.c b/sys/arch/vax/uba/ts.c index a58bfa56808..48cb15a7845 100644 --- a/sys/arch/vax/uba/ts.c +++ b/sys/arch/vax/uba/ts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts.c,v 1.16 2004/01/29 21:34:17 deraadt Exp $ */ +/* $OpenBSD: ts.c,v 1.17 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ts.c,v 1.11 1997/01/11 11:34:43 ragge Exp $ */ /*- @@ -193,7 +193,7 @@ int tsclose(dev_t, int, int, struct proc *); int tsioctl(dev_t, u_long, caddr_t, int, struct proc *); int tsread(dev_t, struct uio *); int tswrite(dev_t, struct uio *); -int tsdump(dev_t, daddr_t, caddr_t, size_t); +int tsdump(dev_t, daddr64_t, caddr_t, size_t); struct cfdriver ts_cd = { NULL, "ts", DV_DULL @@ -1342,7 +1342,7 @@ tswrite (dev, uio) int tsdump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/vax/vax/ctu.c b/sys/arch/vax/vax/ctu.c index 0e1cd8ee015..e7756a79fd0 100644 --- a/sys/arch/vax/vax/ctu.c +++ b/sys/arch/vax/vax/ctu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctu.c,v 1.9 2006/01/20 23:27:26 miod Exp $ */ +/* $OpenBSD: ctu.c,v 1.10 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ctu.c,v 1.10 2000/03/23 06:46:44 thorpej Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -98,7 +98,7 @@ int ctuopen(dev_t, int, int, struct proc *); int ctuclose(dev_t, int, int, struct proc *); void ctustrategy(struct buf *); int ctuioctl(dev_t, u_long, caddr_t, int, struct proc *); -int ctudump(dev_t, daddr_t, caddr_t, size_t); +int ctudump(dev_t, daddr64_t, caddr_t, size_t); static struct callout ctu_watch_ch = CALLOUT_INITIALIZER; @@ -240,7 +240,7 @@ ctuioctl(dev, cmd, data, fflag, p) int ctudump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index c2ae7cfc0e0..7b8fa575f70 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.91 2007/05/29 20:36:48 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.92 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -595,8 +595,8 @@ void dumpsys() { int maj, psize, pg; - daddr_t blkno; - int (*dump)(dev_t, daddr_t, caddr_t, size_t); + daddr64_t blkno; + int (*dump)(dev_t, daddr64_t, caddr_t, size_t); paddr_t maddr; int error; kcore_seg_t *kseg_p; diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index 0402691fdd9..94696d9be4a 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hdc9224.c,v 1.15 2007/06/05 00:38:19 deraadt Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.16 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -438,7 +438,7 @@ hdstrategy(struct buf *bp) struct hdcsoftc *sc; struct disklabel *lp; int unit, s; - daddr_t bn; + daddr64_t bn; unit = DISKUNIT(bp->b_dev); if (unit > hd_cd.cd_ndevs || (hd = hd_cd.cd_devs[unit]) == NULL) { @@ -767,7 +767,7 @@ hdwrite(dev_t dev, struct uio *uio, int flag) * */ int -hddump(dev_t dev, daddr_t daddr, caddr_t addr, size_t size) +hddump(dev_t dev, daddr64_t daddr, caddr_t addr, size_t size) { return 0; } diff --git a/sys/compat/ibcs2/ibcs2_types.h b/sys/compat/ibcs2/ibcs2_types.h index e98ece7f35a..9e947a92d59 100644 --- a/sys/compat/ibcs2/ibcs2_types.h +++ b/sys/compat/ibcs2/ibcs2_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ibcs2_types.h,v 1.2 1996/08/02 20:35:16 niklas Exp $ */ +/* $OpenBSD: ibcs2_types.h,v 1.3 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ibcs2_types.h,v 1.5 1995/08/14 01:11:54 mycroft Exp $ */ /* @@ -38,7 +38,7 @@ typedef unsigned char ibcs2_uchar_t; typedef unsigned long ibcs2_ulong_t; typedef char * ibcs2_caddr_t; -typedef long ibcs2_daddr_t; +typedef int32_t ibcs2_daddr_t; typedef long ibcs2_off_t; typedef long ibcs2_key_t; typedef unsigned short ibcs2_uid_t; diff --git a/sys/compat/linux/linux_blkio.c b/sys/compat/linux/linux_blkio.c index 74c7063379b..a38cca637c2 100644 --- a/sys/compat/linux/linux_blkio.c +++ b/sys/compat/linux/linux_blkio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_blkio.c,v 1.6 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: linux_blkio.c,v 1.7 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: linux_blkio.c,v 1.3 2001/01/18 17:48:04 tv Exp $ */ /* @@ -91,6 +91,7 @@ linux_ioctl_blkio(struct proc *p, struct linux_sys_ioctl_args *uap, size = label.d_nsectors * label.d_ntracks * label.d_ncylinders; } else + /* XXX ignores > 32bit blocks */ size = DL_GETPSIZE(partp.part); error = copyout(&size, SCARG(uap, data), sizeof size); break; diff --git a/sys/compat/sunos/sunos.h b/sys/compat/sunos/sunos.h index 1c12971fc96..202a204cc05 100644 --- a/sys/compat/sunos/sunos.h +++ b/sys/compat/sunos/sunos.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos.h,v 1.8 2002/03/14 01:26:50 millert Exp $ */ +/* $OpenBSD: sunos.h,v 1.9 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: sunos.h,v 1.8 1996/05/05 16:07:43 veego Exp $ */ #define SUNM_RDONLY 0x01 /* mount fs read-only */ @@ -45,7 +45,7 @@ struct sunos_nfs_args { struct sunos_ustat { - daddr_t f_tfree; /* total free */ + int32_t f_tfree; /* total free */ ino_t f_tinode; /* total inodes free */ char f_path[6]; /* filsys name */ char f_fpack[6]; /* filsys pack name */ diff --git a/sys/compat/svr4/svr4_types.h b/sys/compat/svr4/svr4_types.h index 5772af7e821..e7bd9cb9481 100644 --- a/sys/compat/svr4/svr4_types.h +++ b/sys/compat/svr4/svr4_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_types.h,v 1.5 1999/10/07 17:23:53 brad Exp $ */ +/* $OpenBSD: svr4_types.h,v 1.6 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: svr4_types.h,v 1.11 1998/09/11 12:34:46 mycroft Exp $ */ /*- @@ -52,7 +52,7 @@ typedef u_long svr4_mode_t; typedef u_long svr4_nlink_t; typedef long svr4_uid_t; typedef long svr4_gid_t; -typedef long svr4_daddr_t; +typedef int32_t svr4_daddr_t; typedef long svr4_pid_t; typedef long svr4_time_t; typedef long svr4_blkcnt_t; diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c index 2a7d0828292..bfac657c5ac 100644 --- a/sys/compat/ultrix/ultrix_misc.c +++ b/sys/compat/ultrix/ultrix_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ultrix_misc.c,v 1.29 2003/06/02 23:28:01 millert Exp $ */ +/* $OpenBSD: ultrix_misc.c,v 1.30 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ultrix_misc.c,v 1.23 1996/04/07 17:23:04 jonathan Exp $ */ /* @@ -467,7 +467,7 @@ ultrix_sys_nfssvc(p, v, retval) #endif /* NFSSERVER */ struct ultrix_ustat { - daddr_t f_tfree; /* total free */ + int32_t f_tfree; /* total free */ ino_t f_tinode; /* total inodes free */ char f_fname[6]; /* filsys name */ char f_fpack[6]; /* filsys pack name */ diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index d1aeeccabd2..82722893171 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.61 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: wd.c,v 1.62 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -506,7 +506,7 @@ wdstart(void *arg) void __wdstart(struct wd_softc *wd, struct buf *bp) { - daddr_t nblks; + daddr64_t nblks; wd->sc_wdc_bio.blkno = bp->b_blkno + DL_GETPOFFSET(&wd->sc_dk.dk_label->d_partitions[DISKPART(bp->b_dev)]); @@ -952,12 +952,12 @@ wdformat(struct buf *bp) } #endif -int +daddr64_t wdsize(dev_t dev) { struct wd_softc *wd; int part, omask; - int size; + int64_t size; WDCDEBUG_PRINT(("wdsize\n"), DEBUG_FUNCS); @@ -992,7 +992,7 @@ static int wddumpmulti = 1; * Dump core after a system crash. */ int -wddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +wddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { struct wd_softc *wd; /* disk unit to do the I/O */ struct disklabel *lp; /* disk's disklabel */ diff --git a/sys/dev/ata/wdvar.h b/sys/dev/ata/wdvar.h index 429d49ec4eb..0efca4b845f 100644 --- a/sys/dev/ata/wdvar.h +++ b/sys/dev/ata/wdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdvar.h,v 1.11 2004/09/24 07:05:44 grange Exp $ */ +/* $OpenBSD: wdvar.h,v 1.12 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: wdvar.h,v 1.3 1998/11/11 19:38:27 bouyer Exp $ */ /* @@ -48,9 +48,9 @@ struct ata_bio { #define ATA_LBA48 0x0080 /* transfer uses 48-bit LBA addressing */ int multi; /* number of blocks to transfer in multi-mode */ struct disklabel *lp; /* pointer to drive's label info */ - daddr_t blkno; /* block addr */ - daddr_t blkdone; /* number of blks transferred */ - daddr_t nblks; /* number of block currently transfering */ + daddr64_t blkno; /* block addr */ + daddr64_t blkdone; /* number of blks transferred */ + daddr64_t nblks; /* number of block currently transfering */ int nbytes; /* number of bytes currently transfering */ long bcount; /* total number of bytes */ char *databuf; /* data buffer address */ @@ -62,7 +62,7 @@ struct ata_bio { #define TIMEOUT 4 /* device timed out */ #define ERR_NODEV 5 /* device bas been detached */ u_int8_t r_error; /* copy of error register */ - daddr_t badsect[127]; /* 126 plus trailing -1 marker */ + daddr64_t badsect[127]; /* 126 plus trailing -1 marker */ struct wd_softc *wd; }; diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 4f6e9b89c13..7a6047b1c2e 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.74 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: ccd.c,v 1.75 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -173,14 +173,14 @@ void ccdattach(int); /* called by biodone() at interrupt time */ void ccdiodone(struct buf *); -int ccdsize(dev_t); +daddr64_t ccdsize(dev_t); void ccdstart(struct ccd_softc *, struct buf *); void ccdinterleave(struct ccd_softc *); void ccdintr(struct ccd_softc *, struct buf *); int ccdinit(struct ccddevice *, char **, struct proc *); int ccdlookup(char *, struct proc *p, struct vnode **); -long ccdbuffer(struct ccd_softc *, struct buf *, daddr_t, caddr_t, +long ccdbuffer(struct ccd_softc *, struct buf *, daddr64_t, caddr_t, long, struct ccdbuf **); void ccdgetdisklabel(dev_t, struct ccd_softc *, struct disklabel *, struct cpu_disklabel *, int); @@ -268,7 +268,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct proc *p) { struct ccd_softc *cs = &ccd_softc[ccd->ccd_unit]; struct ccdcinfo *ci = NULL; - size_t size; + daddr64_t size; int ix, rpm; struct vnode *vp; struct vattr va; @@ -468,7 +468,7 @@ ccdinterleave(struct ccd_softc *cs) { struct ccdcinfo *ci, *smallci; struct ccdiinfo *ii; - daddr_t bn, lbn; + daddr64_t bn, lbn; int ix; u_long size; @@ -710,7 +710,7 @@ ccdstart(struct ccd_softc *cs, struct buf *bp) long bcount, rcount; struct ccdbuf **cbpp; caddr_t addr; - daddr_t bn; + daddr64_t bn; struct partition *pp; CCD_DPRINTF(CCDB_FOLLOW, ("ccdstart(%p, %p, %s)\n", cs, bp, @@ -764,12 +764,12 @@ ccdstart(struct ccd_softc *cs, struct buf *bp) * Build a component buffer header. */ long -ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr_t bn, caddr_t addr, +ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr64_t bn, caddr_t addr, long bcount, struct ccdbuf **cbpp) { struct ccdcinfo *ci, *ci2 = NULL; struct ccdbuf *cbp; - daddr_t cbn, cboff, sblk; + daddr64_t cbn, cboff, sblk; int ccdisk, ccdisk2, off; long cnt; struct ccdiinfo *ii; @@ -1269,11 +1269,12 @@ ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) return (0); } -int +daddr64_t ccdsize(dev_t dev) { struct ccd_softc *cs; - int part, size, unit; + int part, unit; + daddr64_t size; unit = DISKUNIT(dev); if (unit >= numccd) @@ -1299,7 +1300,7 @@ ccdsize(dev_t dev) } int -ccddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +ccddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ diff --git a/sys/dev/ccdvar.h b/sys/dev/ccdvar.h index 81e44403938..94ae9164ca3 100644 --- a/sys/dev/ccdvar.h +++ b/sys/dev/ccdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ccdvar.h,v 1.10 2007/04/18 19:06:56 miod Exp $ */ +/* $OpenBSD: ccdvar.h,v 1.11 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ccdvar.h,v 1.11 1996/02/28 01:08:32 thorpej Exp $ */ /*- @@ -162,11 +162,11 @@ struct ccdcinfo { * 2 starting at offset 5. */ struct ccdiinfo { - daddr_t ii_startblk; /* starting scaled block # for range */ - daddr_t ii_startoff; /* starting component offset (block #) */ - int *ii_index; /* ordered list of components in range */ - int *ii_parity; /* list of parity shifts */ - int ii_ndisk; /* # of disks range is interleaved over */ + daddr64_t ii_startblk; /* starting scaled block # for range */ + daddr64_t ii_startoff; /* starting component offset (block #) */ + int *ii_index; /* ordered list of components in range */ + int *ii_parity; /* list of parity shifts */ + int ii_ndisk; /* # of disks range is interleaved over */ }; /* diff --git a/sys/dev/flash.c b/sys/dev/flash.c index c96562cb342..bdc1c6650f5 100644 --- a/sys/dev/flash.c +++ b/sys/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.4 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: flash.c,v 1.5 2007/06/06 17:15:13 deraadt Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org> @@ -865,13 +865,13 @@ flashioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) } int -flashdump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +flashdump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { printf("flashdump\n"); return ENODEV; } -int +daddr64_t flashsize(dev_t dev) { printf("flashsize\n"); @@ -900,7 +900,7 @@ void _flashstart(struct flash_softc *sc, struct buf *bp) { int part; - long offset; + daddr64_t offset; long pgno; part = flashpart(bp->b_dev); diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 2c45df9ed71..7144ccae957 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.64 2007/06/05 00:38:21 deraadt Exp $ */ +/* $OpenBSD: fd.c,v 1.65 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -102,7 +102,7 @@ struct fd_softc { struct fd_type *sc_deftype; /* default type descriptor */ struct fd_type *sc_type; /* current type descriptor */ - daddr_t sc_blkno; /* starting block number */ + daddr64_t sc_blkno; /* starting block number */ int sc_bcount; /* byte count left */ int sc_opts; /* user-set options */ int sc_skip; /* bytes already transferred */ @@ -580,7 +580,7 @@ fdclose(dev, flags, mode, p) return 0; } -int +daddr64_t fdsize(dev) dev_t dev; { @@ -592,7 +592,7 @@ fdsize(dev) int fddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 07a51bc3fd9..805463f16e9 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.45 2007/06/05 00:38:21 deraadt Exp $ */ +/* $OpenBSD: mcd.c,v 1.46 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -94,7 +94,7 @@ struct mcd_mbx { int retry, count; struct buf *bp; - daddr_t blkno; + daddr64_t blkno; int nblk; int sz; u_long skip; @@ -177,7 +177,7 @@ u_int8_t const __bin2bcd[] = { #define bin2bcd(b) (__bin2bcd[(b)&0xff]) static void hsg2msf(int, bcd_t *); -static daddr_t msf2hsg(bcd_t *, int); +static daddr64_t msf2hsg(bcd_t *, int); int mcd_playtracks(struct mcd_softc *, struct ioc_play_track *); int mcd_playmsf(struct mcd_softc *, struct ioc_play_msf *); @@ -778,7 +778,7 @@ mcd_get_parms(sc) struct mcd_softc *sc; { struct mcd_mbox mbx; - daddr_t size; + daddr64_t size; int error; /* Send volume info command. */ @@ -800,7 +800,7 @@ mcd_get_parms(sc) return 0; } -int +daddr64_t mcdsize(dev) dev_t dev; { @@ -812,7 +812,7 @@ mcdsize(dev) int mcddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { @@ -1101,12 +1101,12 @@ hsg2msf(hsg, msf) M_msf(msf) = bin2bcd(hsg); } -static daddr_t +static daddr64_t msf2hsg(msf, relative) bcd_t *msf; int relative; { - daddr_t blkno; + daddr64_t blkno; blkno = bcd2bin(M_msf(msf)) * 75 * 60 + bcd2bin(S_msf(msf)) * 75 + @@ -1454,7 +1454,7 @@ mcd_toc_entries(sc, te) struct cd_toc_entry entries[MCD_MAXTOCS]; } data; u_char trk; - daddr_t lba; + daddr64_t lba; int error, n; if (len > sizeof(data.entries) || @@ -1574,7 +1574,7 @@ mcd_read_subchannel(sc, ch) int len = ch->data_len; union mcd_qchninfo q; struct cd_sub_channel_info data; - daddr_t lba; + daddr64_t lba; int error; if (sc->debug) diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index 7b2b4f2336d..5fddda32e4d 100644 --- a/sys/dev/raidframe/rf_openbsdkintf.c +++ b/sys/dev/raidframe/rf_openbsdkintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_openbsdkintf.c,v 1.36 2007/06/05 00:38:22 deraadt Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.37 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -181,7 +181,7 @@ int raidioctl(dev_t, u_long, caddr_t, int, struct proc *); int raidwrite(dev_t, struct uio *, int); int raidread(dev_t, struct uio *, int); void raidstrategy(struct buf *); -int raiddump(dev_t, daddr_t, caddr_t, size_t); +int raiddump(dev_t, daddr64_t, caddr_t, size_t); /* * Pilfered from ccd.c @@ -611,7 +611,7 @@ raidsize(dev_t dev) } int -raiddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +raiddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ return (ENXIO); @@ -1719,7 +1719,7 @@ raidstart(RF_Raid_t *raidPtr) RF_RaidAddr_t raid_addr; int retcode; struct partition *pp; - daddr_t blocknum; + daddr64_t blocknum; int unit; struct raid_softc *rs; int do_async; @@ -1761,8 +1761,8 @@ raidstart(RF_Raid_t *raidPtr) blocknum += DL_GETPOFFSET(pp); } - db1_printf(("Blocks: %d, %d\n", (int) bp->b_blkno, - (int) blocknum)); + db1_printf(("Blocks: %d, %lld\n", (int) bp->b_blkno, + blocknum)); db1_printf(("bp->b_bcount = %d\n", (int) bp->b_bcount)); db1_printf(("bp->b_resid = %d\n", (int) bp->b_resid)); diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index f5fcc1d70b5..c2f138f3e7a 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.32 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.33 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -211,14 +211,14 @@ dev_type_dump(rddump); int rddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { return ENODEV; } -int +daddr64_t rdsize(dev_t dev) { int part, unit; diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index 65ce1549449..46be3692a8e 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.30 2007/06/02 00:53:35 marco Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.31 2007/06/06 17:15:13 deraadt Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -196,8 +196,8 @@ struct sr_chunk_meta { u_int32_t scm_status; /* use bio bioc_disk status */ u_int32_t scm_pad1; char scm_devname[32];/* /dev/XXXXX */ - u_quad_t scm_size; /* size of partition */ - u_quad_t scm_coerced_size; /* coerced size of part */ + int64_t scm_size; /* size of partition */ + int64_t scm_coerced_size; /* coerced size of part */ struct sr_uuid scm_uuid; /* unique identifier */ } __packed; @@ -210,7 +210,7 @@ struct sr_chunk { /* helper members before metadata makes it onto the chunk */ int src_meta_ondisk;/* set when meta is on disk */ char src_devname[32]; - quad_t src_size; + int64_t src_size; SLIST_ENTRY(sr_chunk) src_link; }; @@ -224,7 +224,7 @@ struct sr_vol_meta { u_int32_t svm_flags; /* flags */ #define SR_VOL_DIRTY 0x01 u_int32_t svm_level; /* raid level */ - u_quad_t svm_size; /* virtual disk size */ + int64_t svm_size; /* virtual disk size */ char svm_devname[32];/* /dev/XXXXX */ char svm_vendor[8]; /* scsi vendor */ char svm_product[16];/* scsi product */ diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 15777a7df78..eeae63a60cd 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.76 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.77 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -161,13 +161,13 @@ int vndsetcred(struct vnd_softc *, struct ucred *); void vndiodone(struct buf *); void vndshutdown(void); void vndgetdisklabel(dev_t, struct vnd_softc *); -void vndencrypt(struct vnd_softc *, caddr_t, size_t, daddr_t, int); +void vndencrypt(struct vnd_softc *, caddr_t, size_t, daddr64_t, int); #define vndlock(sc) rw_enter(&sc->sc_rwlock, RW_WRITE|RW_INTR) #define vndunlock(sc) rw_exit_write(&sc->sc_rwlock) void -vndencrypt(struct vnd_softc *vnd, caddr_t addr, size_t size, daddr_t off, +vndencrypt(struct vnd_softc *vnd, caddr_t addr, size_t size, daddr64_t off, int encrypt) { int i, bsize; @@ -437,7 +437,7 @@ vndstrategy(struct buf *bp) /* Loop until all queued requests are handled. */ for (;;) { int part = DISKPART(bp->b_dev); - int off = DL_GETPOFFSET(&vnd->sc_dk.dk_label->d_partitions[part]); + daddr64_t off = DL_GETPOFFSET(&vnd->sc_dk.dk_label->d_partitions[part]); aiov.iov_base = bp->b_data; auio.uio_resid = aiov.iov_len = bp->b_bcount; @@ -997,7 +997,7 @@ vndclear(struct vnd_softc *vnd) vnd->sc_size = 0; } -int +daddr64_t vndsize(dev_t dev) { int unit = vndunit(dev); @@ -1009,7 +1009,7 @@ vndsize(dev_t dev) } int -vnddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +vnddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ diff --git a/sys/isofs/cd9660/cd9660_bmap.c b/sys/isofs/cd9660/cd9660_bmap.c index 60d48eef5b7..7d449c35e0a 100644 --- a/sys/isofs/cd9660/cd9660_bmap.c +++ b/sys/isofs/cd9660/cd9660_bmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_bmap.c,v 1.5 2007/06/01 23:47:55 deraadt Exp $ */ +/* $OpenBSD: cd9660_bmap.c,v 1.6 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: cd9660_bmap.c,v 1.7 1997/01/24 00:27:29 cgd Exp $ */ /*- @@ -59,7 +59,7 @@ cd9660_bmap(v) { struct vop_bmap_args *ap = v; struct iso_node *ip = VTOI(ap->a_vp); - daddr_t lblkno = ap->a_bn; + daddr64_t lblkno = ap->a_bn; int bshift; /* diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index 51455eef599..fe1d4f562cc 100644 --- a/sys/isofs/cd9660/cd9660_lookup.c +++ b/sys/isofs/cd9660/cd9660_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_lookup.c,v 1.13 2007/06/01 23:47:55 deraadt Exp $ */ +/* $OpenBSD: cd9660_lookup.c,v 1.14 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */ /*- @@ -432,7 +432,7 @@ cd9660_bufatoff(struct iso_node *ip, off_t offset, char **res, { struct iso_mnt *imp; struct buf *bp; - daddr_t lbn; + daddr64_t lbn; int bsize, error; struct vnode *vp = ITOV(ip); diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 1f00abe8993..7ee014908ca 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.42 2007/06/01 23:47:55 deraadt Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.43 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -285,7 +285,7 @@ cd9660_read(v) register struct iso_node *ip = VTOI(vp); register struct iso_mnt *imp; struct buf *bp; - daddr_t lbn, rablock; + daddr64_t lbn, rablock; off_t diff; int error = 0; long size, n, on; diff --git a/sys/isofs/cd9660/iso_rrip.h b/sys/isofs/cd9660/iso_rrip.h index 3555efc7556..108eb69f5b4 100644 --- a/sys/isofs/cd9660/iso_rrip.h +++ b/sys/isofs/cd9660/iso_rrip.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iso_rrip.h,v 1.4 2003/06/02 23:28:05 millert Exp $ */ +/* $OpenBSD: iso_rrip.h,v 1.5 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: iso_rrip.h,v 1.3 1994/06/29 06:32:02 cgd Exp $ */ /*- @@ -59,7 +59,7 @@ typedef struct { struct iso_node *inop; int fields; /* interesting fields in this analysis */ - daddr_t iso_ce_blk; /* block of continuation area */ + daddr64_t iso_ce_blk; /* block of continuation area */ off_t iso_ce_off; /* offset of continuation area */ int iso_ce_len; /* length of continuation area */ struct iso_mnt *imp; /* mount structure */ diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index ea4f2736c02..fc2a2c831ef 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.26 2007/06/01 23:47:56 deraadt Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.27 2007/06/06 17:15:13 deraadt Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -1221,7 +1221,7 @@ udf_bmap_internal(struct unode *up, off_t offset, daddr64_t *sector, void *icb; struct icb_tag *tag; uint32_t icblen = 0; - daddr_t lsector; + daddr64_t lsector; int ad_offset, ad_num = 0; int i, p_offset; diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index db97b94d3a8..27c07c3dec8 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.49 2007/06/06 16:49:51 deraadt Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.50 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -248,7 +248,7 @@ diskerr(struct buf *bp, char *dname, char *what, int pri, int blkdone, int unit = DISKUNIT(bp->b_dev), part = DISKPART(bp->b_dev); int (*pr)(const char *, ...); char partname = 'a' + part; - int sn; + daddr64_t sn; if (pri != LOG_PRINTF) { static const char fmt[] = ""; @@ -260,18 +260,18 @@ diskerr(struct buf *bp, char *dname, char *what, int pri, int blkdone, bp->b_flags & B_READ ? "read" : "writ"); sn = bp->b_blkno; if (bp->b_bcount <= DEV_BSIZE) - (*pr)("%d", sn); + (*pr)("%lld", sn); else { if (blkdone >= 0) { sn += blkdone; - (*pr)("%d of ", sn); + (*pr)("%lld of ", sn); } - (*pr)("%d-%d", bp->b_blkno, + (*pr)("%lld-%lld", bp->b_blkno, bp->b_blkno + (bp->b_bcount - 1) / DEV_BSIZE); } if (lp && (blkdone >= 0 || bp->b_bcount <= lp->d_secsize)) { sn += DL_GETPOFFSET(&lp->d_partitions[part]); - (*pr)(" (%s%d bn %d; cn %d", dname, unit, sn, + (*pr)(" (%s%d bn %lld; cn %d", dname, unit, sn, sn / lp->d_secpercyl); sn %= lp->d_secpercyl; (*pr)(" tn %d sn %d)", sn / lp->d_nsectors, sn % lp->d_nsectors); diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 0eeffff87f2..68d9ebc92f5 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.127 2007/06/05 00:38:23 deraadt Exp $ */ +/* $OpenBSD: cd.c,v 1.128 2007/06/06 17:15:14 deraadt Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -1636,7 +1636,7 @@ cd_get_parms(struct cd_softc *cd, int flags) return (0); } -int +daddr64_t cdsize(dev_t dev) { @@ -1645,7 +1645,7 @@ cdsize(dev_t dev) } int -cddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +cddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ return ENXIO; diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index d7cb2e9f19e..f8e99c19be9 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.130 2007/06/05 00:38:23 deraadt Exp $ */ +/* $OpenBSD: sd.c,v 1.131 2007/06/06 17:15:14 deraadt Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -597,7 +597,8 @@ sdstart(void *v) struct scsi_rw_16 cmd_16; struct scsi_rw cmd_small; struct scsi_generic *cmdp; - int blkno, nblks, cmdlen, error; + int64_t blkno; + int nblks, cmdlen, error; struct partition *p; SC_DEBUG(sc_link, SDEV_DB2, ("sdstart\n")); @@ -1138,12 +1139,12 @@ sd_interpret_sense(struct scsi_xfer *xs) return (retval); } -int +daddr64_t sdsize(dev_t dev) { struct sd_softc *sd; int part, omask; - int size; + int64_t size; sd = sdlookup(DISKUNIT(dev)); if (sd == NULL) @@ -1180,14 +1181,14 @@ static int sddoingadump; * at offset 'dumplo' into the partition. */ int -sddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +sddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { struct sd_softc *sd; /* disk unit to do the I/O */ struct disklabel *lp; /* disk's disklabel */ int unit, part; int sectorsize; /* size of a disk sector */ - int nsects; /* number of sectors in partition */ - int sectoff; /* sector offset of partition */ + daddr64_t nsects; /* number of sectors in partition */ + daddr64_t sectoff; /* sector offset of partition */ int totwrt; /* total number of sectors left to write */ int nwrt; /* current number of sectors to write */ struct scsi_rw_big cmd; /* write command */ diff --git a/sys/scsi/st.c b/sys/scsi/st.c index a772f117b55..f22849567a1 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.74 2007/06/01 18:44:48 krw Exp $ */ +/* $OpenBSD: st.c,v 1.75 2007/06/06 17:15:14 deraadt Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -2035,7 +2035,7 @@ bad: free(buf, M_TEMP); int stdump(dev, blkno, va, size) dev_t dev; - int blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/sys/conf.h b/sys/sys/conf.h index dddce436fcb..28c0749b41c 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.81 2007/02/06 22:39:13 dlg Exp $ */ +/* $OpenBSD: conf.h,v 1.82 2007/06/06 17:15:14 deraadt Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -90,9 +90,9 @@ struct bdevsw { void (*d_strategy)(struct buf *bp); int (*d_ioctl)(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p); - int (*d_dump)(dev_t dev, daddr_t blkno, caddr_t va, + int (*d_dump)(dev_t dev, daddr64_t blkno, caddr_t va, size_t size); - int (*d_psize)(dev_t dev); + daddr64_t (*d_psize)(dev_t dev); u_int d_type; /* u_int d_flags; */ }; @@ -102,8 +102,8 @@ struct bdevsw { extern struct bdevsw bdevsw[]; /* bdevsw-specific types */ -#define dev_type_dump(n) int n(dev_t, daddr_t, caddr_t, size_t) -#define dev_type_size(n) int n(dev_t) +#define dev_type_dump(n) int n(dev_t, daddr64_t, caddr_t, size_t) +#define dev_type_size(n) daddr64_t n(dev_t) /* bdevsw-specific initializations */ #define dev_size_init(c,n) (c > 0 ? __CONCAT(n,size) : 0) diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c index b2a3a6573e1..c0e165d4e2c 100644 --- a/sys/uvm/uvm_pager.c +++ b/sys/uvm/uvm_pager.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pager.c,v 1.42 2007/04/13 18:57:49 art Exp $ */ +/* $OpenBSD: uvm_pager.c,v 1.43 2007/06/06 17:15:14 deraadt Exp $ */ /* $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $ */ /* @@ -394,7 +394,7 @@ uvm_mk_pcluster(uobj, pps, npages, center, flags, mlo, mhi) * PGO_SYNCIO: do SYNC I/O (no async) * PGO_PDFREECLUST: pagedaemon: drop cluster on successful I/O * => start/stop: if (uobj && !PGO_ALLPAGES) limit targets to this range - * if (!uobj) start is the (daddr_t) of the starting swapblk + * if (!uobj) start is the (daddr64_t) of the starting swapblk * => return state: * 1. we return the VM_PAGER status code of the pageout * 2. we return with the page queues unlocked @@ -422,7 +422,7 @@ uvm_pager_put(uobj, pg, ppsp_ptr, npages, flags, start, stop) voff_t start, stop; /* IN, IN */ { int result; - daddr_t swblk; + daddr64_t swblk; struct vm_page **ppsp = *ppsp_ptr; UVMHIST_FUNC("uvm_pager_put"); UVMHIST_CALLED(pdhist); @@ -460,7 +460,7 @@ uvm_pager_put(uobj, pg, ppsp_ptr, npages, flags, start, stop) * interested in (in which case the whole cluster gets dropped * in the event of an error or a sync "done"). */ - swblk = (daddr_t) start; + swblk = (daddr64_t) start; /* ppsp and npages should be ok */ } @@ -480,6 +480,7 @@ ReTry: /* object is now unlocked */ } else { /* nothing locked */ + /* XXX daddr64_t -> int */ result = uvm_swap_put(swblk, ppsp, *npages, flags); /* nothing locked */ } @@ -535,6 +536,7 @@ ReTry: */ if (uobj == NULL && pg != NULL) { + /* XXX daddr64_t -> int */ int nswblk = (result == VM_PAGER_AGAIN) ? swblk : 0; if (pg->pg_flags & PQ_ANON) { simple_lock(&pg->uanon->an_lock); @@ -557,8 +559,10 @@ ReTry: if (uobj == NULL) { if (pg) { + /* XXX daddr64_t -> int */ uvm_swap_free(swblk + 1, *npages - 1); } else { + /* XXX daddr64_t -> int */ uvm_swap_free(swblk, *npages); } } @@ -575,6 +579,7 @@ ReTry: * free swslots that we mark bad. */ + /* XXX daddr64_t -> int */ uvm_swap_markbad(swblk, *npages); } } diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index e81a14627bb..0a87cac45b0 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.70 2007/06/01 07:35:35 deraadt Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.71 2007/06/06 17:15:14 deraadt Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -1364,7 +1364,7 @@ sw_reg_strategy(sdp, bp, bn) sz = resid; UVMHIST_LOG(pdhist, "sw_reg_strategy: " - "vp %p/%p offset 0x%lx/0x%lx", + "vp %p/%p offset 0x%lx/0x%llx", sdp->swd_vp, vp, (u_long)byteoff, nbn); /* @@ -1802,7 +1802,7 @@ uvm_swap_io(pps, startslot, npages, flags) struct vm_page **pps; int startslot, npages, flags; { - daddr_t startblk; + daddr64_t startblk; struct buf *bp; vaddr_t kva; int result, s, mapinflags, pflag; |