Module Name: src
Committed By: skrll
Date: Sat Nov 5 14:26:23 UTC 2016
Modified Files:
src/sys/arch/arm/arm32: bus_dma.c
Log Message:
Also return early from _bus_dmamap_sync if we're not bouncing and there
are no {pre,post} ops
Now the KASSERT doesn't fire on cats
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 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.95 src/sys/arch/arm/arm32/bus_dma.c:1.96
--- src/sys/arch/arm/arm32/bus_dma.c:1.95 Sat Jun 18 16:51:44 2016
+++ src/sys/arch/arm/arm32/bus_dma.c Sat Nov 5 14:26:23 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.95 2016/06/18 16:51:44 skrll Exp $ */
+/* $NetBSD: bus_dma.c,v 1.96 2016/11/05 14:26:23 skrll 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.95 2016/06/18 16:51:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.96 2016/11/05 14:26:23 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1086,9 +1086,13 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
#else
const int post_ops = 0;
#endif
- if (!bouncing && pre_ops == 0 && post_ops == BUS_DMASYNC_POSTWRITE) {
- STAT_INCR(sync_postwrite);
- return;
+ if (!bouncing) {
+ if (pre_ops == 0 && post_ops == BUS_DMASYNC_POSTWRITE) {
+ STAT_INCR(sync_postwrite);
+ return;
+ } else if (pre_ops == 0 && post_ops == 0) {
+ return;
+ }
}
KASSERTMSG(bouncing || pre_ops != 0 || (post_ops & BUS_DMASYNC_POSTREAD),
"pre_ops %#x post_ops %#x", pre_ops, post_ops);