From 41a7f54644b1d6d264981e2bd030a6e7a2ae56e2 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 29 Jan 2004 20:26:49 +0000 Subject: In bus_dmamap_sync(), be sure to flush a host pa. --- sys/arch/mvmeppc/mvmeppc/bus_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch/mvmeppc') diff --git a/sys/arch/mvmeppc/mvmeppc/bus_dma.c b/sys/arch/mvmeppc/mvmeppc/bus_dma.c index a06e36a4d55..5f4d75355df 100644 --- a/sys/arch/mvmeppc/mvmeppc/bus_dma.c +++ b/sys/arch/mvmeppc/mvmeppc/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.12 2003/06/02 07:07:25 deraadt Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.13 2004/01/29 20:26:48 miod Exp $ */ /* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */ /*- @@ -421,7 +421,7 @@ _bus_dmamap_sync(t, map, offset, len, op) case BUS_DMASYNC_PREWRITE: case BUS_DMASYNC_PREREAD: for (i = map->dm_nsegs; i--; ) - invdcache((void *)map->dm_segs[i].ds_addr, + invdcache((void *)PCI_MEM_TO_PHYS(map->dm_segs[i].ds_addr), len); break; } @@ -579,7 +579,7 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags) continue; } - return (PCI_MEM_TO_PHYS(segs[i].ds_addr) + off); + return (powerpc_btop(PCI_MEM_TO_PHYS(segs[i].ds_addr) + off)); } /* Page not found. */ -- cgit v1.2.3