diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-26 15:41:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-26 15:41:01 +0000 |
commit | 55d0ea063b25d8b25fea5135f59de22437ecd4ea (patch) | |
tree | 42c739678ad68f903e06cc29eb0db1df3bf6298e /sys/arch/hp300 | |
parent | 47f20d782a94ebc11fb4c7b43294559377be4989 (diff) |
Kill pmap_phys_address(), and force every driver's mmap() routine to return
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument].
This allows MI drivers to implement mmap() routines without having to know
about the pmap_phys_address() implementation and #ifdef obfuscation.
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/dev/diofb.c | 6 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/bus_space.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/mem.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c index 25ba07ce5d7..45996399714 100644 --- a/sys/arch/hp300/dev/diofb.c +++ b/sys/arch/hp300/dev/diofb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diofb.c,v 1.17 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -487,12 +487,12 @@ diofb_mmap(void * v, off_t offset, int prot) switch (fb->mapmode) { case WSDISPLAYIO_MODE_MAPPED: if (offset >= 0 && offset < DIOFB_REGSPACE) - return (((paddr_t)fb->regaddr + offset) >> PGSHIFT); + return ((paddr_t)fb->regaddr + offset); offset -= DIOFB_REGSPACE; /* FALLTHROUGH */ case WSDISPLAYIO_MODE_DUMBFB: if (offset >= 0 && offset < fb->fbsize) - return (((paddr_t)fb->fbaddr + offset) >> PGSHIFT); + return ((paddr_t)fb->fbaddr + offset); break; } diff --git a/sys/arch/hp300/hp300/bus_space.c b/sys/arch/hp300/hp300/bus_space.c index a25a4ba1925..e302f99ac82 100644 --- a/sys/arch/hp300/hp300/bus_space.c +++ b/sys/arch/hp300/hp300/bus_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_space.c,v 1.6 2008/06/26 05:42:10 ray Exp $ */ +/* $OpenBSD: bus_space.c,v 1.7 2010/12/26 15:40:59 miod Exp $ */ /* $NetBSD: bus_space.c,v 1.6 2002/09/27 15:36:02 provos Exp $ */ /*- @@ -709,6 +709,6 @@ paddr_t bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t offset, int prot, int flags) { - return (((paddr_t)addr + offset) >> PAGE_SHIFT); + return ((paddr_t)addr + offset); } #endif diff --git a/sys/arch/hp300/hp300/mem.c b/sys/arch/hp300/hp300/mem.c index 999d3334469..c2e8bfa663c 100644 --- a/sys/arch/hp300/hp300/mem.c +++ b/sys/arch/hp300/hp300/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.25 2009/06/10 15:58:49 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.26 2010/12/26 15:40:59 miod Exp $ */ /* $NetBSD: mem.c,v 1.25 1999/03/27 00:30:06 mycroft Exp $ */ /* @@ -253,7 +253,7 @@ mmmmap(dev, off, prot) */ if ((u_int)off < lowram || (u_int)off >= 0xFFFFFFFC) return (-1); - return (atop(off)); + return (off); } int |