summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-01-04 21:12:56 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-01-04 21:12:56 +0000
commite18c67189da470f1eb4149eae8e689e05da21f2e (patch)
tree148288d513a8bca0e2184b1952aa99c51185dcee /sys/arch
parent0199e2060a0344e1d9ea19ae477ea339bccc9da4 (diff)
Use pmap_uncache_page() to alter cacheability of pages in bus_dmamem_map()
instead of playing with pte bits directly; this will cause cacheability to be restored eventually; makes the zaurus textmode console memory cached again after exiting from X. ok drahn@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/arm/bus_dma.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c
index 28a47e7579c..6c367ebc63d 100644
--- a/sys/arch/arm/arm/bus_dma.c
+++ b/sys/arch/arm/arm/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.19 2010/12/26 15:40:59 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.20 2011/01/04 21:12:55 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */
/*-
@@ -686,7 +686,9 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
size_t ssize;
bus_addr_t addr;
int curseg, error;
- pt_entry_t *ptep/*, pte*/;
+#ifdef DEBUG_DMA
+ pt_entry_t *ptep;
+#endif
#ifdef DEBUG_DMA
printf("dmamem_map: t=%p segs=%p nsegs=%x size=%lx flags=%x\n", t,
@@ -735,9 +737,7 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
if (flags & BUS_DMA_COHERENT) {
cpu_dcache_wbinv_range(va, PAGE_SIZE);
cpu_drain_writebuf();
- ptep = vtopte(va);
- *ptep &= ~L2_S_CACHE_MASK;
- PTE_SYNC(ptep);
+ pmap_uncache_page(va, addr);
tlb_flush();
}
#ifdef DEBUG_DMA