diff options
author | chuck <chuck@cvs.openbsd.org> | 1996-01-12 21:21:55 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1996-01-12 21:21:55 +0000 |
commit | fb27ec0b6201392f9c9cc5b519ba8625946a6cbd (patch) | |
tree | 6edaafa25d142c4452954f44c12e9ecbef40c504 /sys | |
parent | f3c0abba859565233ed9d9ffc2225d0ff749c5d0 (diff) |
change mapdev() so that it includes the offset from the start of the
page in the virtual address it returns.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index f2b858ad5ad..b07e6110b47 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -881,7 +881,8 @@ mapdev(rr, virt, offset, size, bustype) if (iobase > IODEV_END) /* unlikely */ panic("mapiodev"); } - ret = (void *)v; + ret = (void *)(v | (((u_long)rr->rr_paddr + offset) & PGOFSET)); + /* note: preserve page offset */ pa = trunc_page(rr->rr_paddr + offset); #ifdef notyet pmtype = (cputyp == CPU_SUN4M) |