Module Name:    src
Committed By:   jmcneill
Date:           Tue Nov  5 10:21:31 UTC 2019

Modified Files:
        src/sys/arch/arm/arm32: bus_dma.c

Log Message:
Do not try to use direct map for prefetchable mappings


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/arm/arm32/bus_dma.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.117 src/sys/arch/arm/arm32/bus_dma.c:1.118
--- src/sys/arch/arm/arm32/bus_dma.c:1.117	Tue Nov  5 09:57:47 2019
+++ src/sys/arch/arm/arm32/bus_dma.c	Tue Nov  5 10:21:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.117 2019/11/05 09:57:47 jmcneill Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.118 2019/11/05 10:21:31 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #include "opt_cputypes.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.117 2019/11/05 09:57:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.118 2019/11/05 10:21:31 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -1339,7 +1339,7 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma
 	 * contiguous area then this area is already mapped.  Let's see if we
 	 * avoid having a separate mapping for it.
 	 */
-	if (nsegs == 1) {
+	if (nsegs == 1 && (flags & BUS_DMA_PREFETCHABLE) == 0) {
 		/*
 		 * If this is a non-COHERENT mapping, then the existing kernel
 		 * mapping is already compatible with it.

Reply via email to