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 Also return early from _bus_dmamap_sync i...
details: https://anonhg.NetBSD.org/src/rev/2faa45487b74
branches: trunk
changeset: 348750:2faa45487b74
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Nov 05 14:26:23 2016 +0000
description:
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
diffstat:
sys/arch/arm/arm32/bus_dma.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 8b80e28be7d0 -r 2faa45487b74 sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c Sat Nov 05 02:59:22 2016 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c Sat Nov 05 14:26:23 2016 +0000
@@ -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 @@
#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);
Home |
Main Index |
Thread Index |
Old Index