artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dec9aef
)
change mapdev() so that it includes the offset from the start of the
author
chuck
<chuck@openbsd.org>
Fri, 12 Jan 1996 21:21:54 +0000
(21:21 +0000)
committer
chuck
<chuck@openbsd.org>
Fri, 12 Jan 1996 21:21:54 +0000
(21:21 +0000)
page in the virtual address it returns.
sys/arch/sparc/sparc/machdep.c
patch
|
blob
|
history
diff --git
a/sys/arch/sparc/sparc/machdep.c
b/sys/arch/sparc/sparc/machdep.c
index
f2b858a
..
b07e611
100644
(file)
--- 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)