Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev Avoid a panic if we are asked to sync a...
details: https://anonhg.NetBSD.org/src/rev/ae49f4d5306a
branches: trunk
changeset: 749674:ae49f4d5306a
user: jdc <jdc%NetBSD.org@localhost>
date: Sat Dec 05 16:48:26 2009 +0000
description:
Avoid a panic if we are asked to sync a zero-length map, by returning
immediately.
diffstat:
sys/arch/sparc64/dev/iommu.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r c4aa3e072f25 -r ae49f4d5306a sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c Sat Dec 05 16:43:25 2009 +0000
+++ b/sys/arch/sparc64/dev/iommu.c Sat Dec 05 16:48:26 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iommu.c,v 1.88 2009/11/07 07:27:46 cegger Exp $ */
+/* $NetBSD: iommu.c,v 1.89 2009/12/05 16:48:26 jdc Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.88 2009/11/07 07:27:46 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.89 2009/12/05 16:48:26 jdc Exp $");
#include "opt_ddb.h"
@@ -1000,6 +1000,10 @@
bus_size_t len, int ops)
{
+ /* If len is 0, then there is nothing to do */
+ if (len == 0)
+ return;
+
if (ops & (BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE)) {
/* Flush the CPU then the IOMMU */
bus_dmamap_sync(t->_parent, map, offset, len, ops);
Home |
Main Index |
Thread Index |
Old Index