summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-06 17:15:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-06 17:15:15 +0000
commit64b0758a0244e515108eec4f2cd5d05a5939ebf1 (patch)
treee5e991586e626374ede95d07956bcaf6a47372be /sys/arch/sparc
parenta0f03208acbc7a85466c7cf68058959c1bbe9668 (diff)
now that all partition size/offsets are potentially 64-bit, change the
type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/fd.c6
-rw-r--r--sys/arch/sparc/dev/presto.c4
-rw-r--r--sys/arch/sparc/dev/xd.c9
-rw-r--r--sys/arch/sparc/dev/xy.c11
-rw-r--r--sys/arch/sparc/include/pmap.h4
-rw-r--r--sys/arch/sparc/sparc/machdep.c6
-rw-r--r--sys/arch/sparc/sparc/pmap.c6
7 files changed, 24 insertions, 22 deletions
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;