change mapdev() so that it includes the offset from the start of the

page in the virtual address it returns.
This commit is contained in:
chuck 1996-01-12 21:22:46 +00:00
parent 59dd89e3b1
commit c488310462
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.54 1996/01/10 23:00:33 pk Exp $ */
/* $NetBSD: machdep.c,v 1.55 1996/01/12 21:22:46 chuck Exp $ */
/*
* Copyright (c) 1992, 1993
@ -874,7 +874,8 @@ mapdev(phys, virt, offset, size, bustype)
if (iobase > IODEV_END) /* unlikely */
panic("mapiodev");
}
ret = (void *)v;
ret = (void *)(v | (((u_long)phys->rr_paddr + offset) & PGOFSET));
/* note: preserve page offset */
pa = trunc_page(phys->rr_paddr + offset);
#ifdef notyet