From: chuck Date: Fri, 12 Jan 1996 21:21:54 +0000 (+0000) Subject: change mapdev() so that it includes the offset from the start of the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f4822b7eaa2dd97781e18b475e091a615dcb5b6a;p=openbsd change mapdev() so that it includes the offset from the start of the page in the virtual address it returns. --- 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)