Module Name:    src
Committed By:   christos
Date:           Tue Jul  2 22:39:45 UTC 2013

Modified Files:
        src/sys/arch/x86/x86: bus_dma.c

Log Message:
make a diagnostic message more informative.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/x86/x86/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/x86/x86/bus_dma.c
diff -u src/sys/arch/x86/x86/bus_dma.c:1.69 src/sys/arch/x86/x86/bus_dma.c:1.70
--- src/sys/arch/x86/x86/bus_dma.c:1.69	Sat Dec  8 07:36:31 2012
+++ src/sys/arch/x86/x86/bus_dma.c	Tue Jul  2 18:39:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.69 2012/12/08 12:36:31 kiyohara Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.70 2013/07/02 22:39:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.69 2012/12/08 12:36:31 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.70 2013/07/02 22:39:45 christos Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -802,9 +802,12 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 #ifdef DIAGNOSTIC
 	if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) {
 		if (offset >= map->dm_mapsize)
-			panic("_bus_dmamap_sync: bad offset");
+			panic("_bus_dmamap_sync: bad offset 0x%jx >= 0x%jx",
+			(intmax_t)offset, (intmax_t)map->dm_mapsize);
 		if ((offset + len) > map->dm_mapsize)
-			panic("_bus_dmamap_sync: bad length");
+			panic("_bus_dmamap_sync: bad length 0x%jx + 0x%jx "
+			    "> 0x%jx", (intmax_t)offset, (intmax_t)len,
+			    (intmax_t)map->dm_mapsize);
 	}
 #endif
 

Reply via email to