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/sgi | |
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/sgi')
-rw-r--r-- | sys/arch/sgi/dev/gbe.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/bus_dma.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sgi/dev/gbe.c b/sys/arch/sgi/dev/gbe.c index 766aa3dc1cd..f4ab42da94b 100644 --- a/sys/arch/sgi/dev/gbe.c +++ b/sys/arch/sgi/dev/gbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gbe.c,v 1.12 2010/03/08 20:54:42 miod Exp $ */ +/* $OpenBSD: gbe.c,v 1.13 2010/12/26 15:41:00 miod Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Joel Sing <jsing@openbsd.org> @@ -917,7 +917,7 @@ gbe_mmap(void *v, off_t offset, int protection) paddr_t pa; if (offset >= 0 && offset < screen->fb_size) - pa = atop(screen->fb_phys + offset); + pa = screen->fb_phys + offset; else pa = -1; diff --git a/sys/arch/sgi/sgi/bus_dma.c b/sys/arch/sgi/sgi/bus_dma.c index c7e7ad201ef..49879ab4d89 100644 --- a/sys/arch/sgi/sgi/bus_dma.c +++ b/sys/arch/sgi/sgi/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.19 2010/06/26 23:24:44 guenther Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.20 2010/12/26 15:41:00 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -529,7 +529,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off, continue; } - return (atop((*t->_device_to_pa)(segs[i].ds_addr) + off)); + return ((*t->_device_to_pa)(segs[i].ds_addr) + off); } /* Page not found. */ |