Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm32 Fix mbuf dmasyncing for extended MMU kern...



details:   https://anonhg.NetBSD.org/src/rev/b068f1c8ffd6
branches:  trunk
changeset: 810269:b068f1c8ffd6
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Aug 24 04:51:18 2015 +0000

description:
Fix mbuf dmasyncing for extended MMU kernels.

diffstat:

 sys/arch/arm/arm32/bus_dma.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r ffff25b548d1 -r b068f1c8ffd6 sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c      Mon Aug 24 04:44:54 2015 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c      Mon Aug 24 04:51:18 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.92 2015/08/21 20:52:47 matt Exp $        */
+/*     $NetBSD: bus_dma.c,v 1.93 2015/08/24 04:51:18 matt Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include "opt_arm_bus_space.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.92 2015/08/21 20:52:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.93 2015/08/24 04:51:18 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -775,13 +775,19 @@
 
        switch (ops) {
        case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE:
+#ifdef ARM_MMU_EXTENDED
+               (void)readonly_p;
+#else
                if (!readonly_p) {
+#endif
                        STAT_INCR(sync_prereadwrite);
                        cpu_dcache_wbinv_range(va, len);
                        cpu_sdcache_wbinv_range(va, pa, len);
                        break;
+#ifndef ARM_MMU_EXTENDED
                }
                /* FALLTHROUGH */
+#endif
 
        case BUS_DMASYNC_PREREAD: {
                const size_t line_size = arm_dcache_align;
@@ -909,7 +915,8 @@
 
                /*
                 * We can save a lot of work here if we know the mapping
-                * is read-only at the MMU:
+                * is read-only at the MMU and we aren't using the armv6+
+                * MMU:
                 *
                 * If a mapping is read-only, no dirty cache blocks will
                 * exist for it.  If a writable mapping was made read-only,



Home | Main Index | Thread Index | Old Index