diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-04-07 17:25:21 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-04-07 17:25:21 +0000 |
commit | a6408aa270ee4114d7139e54af200cf51f31d887 (patch) | |
tree | eff0076bee43ca8a37360f74445a4fd7797ad5c3 /sys | |
parent | d669f660c17e3b1e0bbc59863f00f3edd1e759dd (diff) |
In _dmamem_map(), be sure to convert the address from the device view to
a real physical address in the single-segment short-circuit code.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sgi/sgi/bus_dma.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/sgi/sgi/bus_dma.c b/sys/arch/sgi/sgi/bus_dma.c index b380a14aa1d..637a967c097 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.3 2007/10/02 00:59:12 krw Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.4 2008/04/07 17:25:20 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -491,12 +491,11 @@ _dmamem_map(t, segs, nsegs, size, kvap, flags) int curseg; if (nsegs == 1) { + pa = (*t->_device_to_pa)(segs[0].ds_addr); if (flags & BUS_DMA_COHERENT) - *kvap = (caddr_t)PHYS_TO_XKPHYS(segs[0].ds_addr, - CCA_NC); + *kvap = (caddr_t)PHYS_TO_XKPHYS(pa, CCA_NC); else - *kvap = (caddr_t)PHYS_TO_XKPHYS(segs[0].ds_addr, - CCA_NONCOHERENT); + *kvap = (caddr_t)PHYS_TO_XKPHYS(pa, CCA_NONCOHERENT); return (0); } |