summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
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/sparc64
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/sparc64')
-rw-r--r--sys/arch/sparc64/dev/fd.c31
-rw-r--r--sys/arch/sparc64/include/pmap.h2
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c8
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c6
4 files changed, 26 insertions, 21 deletions
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;