Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc When mapping a page with BUS_SPACE_...
details: https://anonhg.NetBSD.org/src/rev/f2f4eccfd253
branches: trunk
changeset: 544240:f2f4eccfd253
user: matt <matt%NetBSD.org@localhost>
date: Sat Mar 15 07:25:20 2003 +0000
description:
When mapping a page with BUS_SPACE_NOCACHE, make sure to flush the
physical page from the data cache.
diffstat:
sys/arch/powerpc/powerpc/bus_dma.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 3fa0b812a0d1 -r f2f4eccfd253 sys/arch/powerpc/powerpc/bus_dma.c
--- a/sys/arch/powerpc/powerpc/bus_dma.c Sat Mar 15 07:24:37 2003 +0000
+++ b/sys/arch/powerpc/powerpc/bus_dma.c Sat Mar 15 07:25:20 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.6 2003/03/05 22:08:29 matt Exp $ */
+/* $NetBSD: bus_dma.c,v 1.7 2003/03/15 07:25:20 matt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -594,6 +594,13 @@
addr += NBPG, va += NBPG, size -= NBPG) {
if (size == 0)
panic("_bus_dmamem_map: size botch");
+ /*
+ * If we are mapping nocache, flush the page from
+ * cache before we map it.
+ */
+ if (flags & BUS_DMA_NOCACHE)
+ dcbf(addr, NBPG,
+ curcpu()->ci_ci.dcache_line_size);
pmap_kenter_pa(va, addr,
VM_PROT_READ | VM_PROT_WRITE |
PMAP_WIRED |
Home |
Main Index |
Thread Index |
Old Index