Module Name:    src
Committed By:   nakayama
Date:           Mon Dec  7 19:57:35 UTC 2009

Modified Files:
        src/sys/arch/sparc64/dev: iommu.c

Log Message:
Print the warning message if extent_free fails.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc64/dev/iommu.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/sparc64/dev/iommu.c
diff -u src/sys/arch/sparc64/dev/iommu.c:1.94 src/sys/arch/sparc64/dev/iommu.c:1.95
--- src/sys/arch/sparc64/dev/iommu.c:1.94	Mon Dec  7 11:24:30 2009
+++ src/sys/arch/sparc64/dev/iommu.c	Mon Dec  7 19:57:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $	*/
+/*	$NetBSD: iommu.c,v 1.95 2009/12/07 19:57:34 nakayama Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.95 2009/12/07 19:57:34 nakayama Exp $");
 
 #include "opt_ddb.h"
 
@@ -534,12 +534,14 @@
 			DPRINTF(IDB_INFO, ("iommu_dvmamap_load: "
 			    "too many segments %d\n", seg));
 			s = splhigh();
-			/* How can this fail?  And if it does what can we do? */
 			err = extent_free(is->is_dvmamap,
 			    dvmaddr, sgsize, EX_NOWAIT);
 			map->_dm_dvmastart = 0;
 			map->_dm_dvmasize = 0;
 			splx(s);
+			if (err != 0)
+				printf("warning: %s: %" PRId64
+				    " of DVMA space lost\n", __func__, sgsize);
 			return (EFBIG);
 		}
 		sgstart += len;
@@ -643,7 +645,8 @@
 	map->_dm_dvmasize = 0;
 	splx(s);
 	if (error != 0)
-		printf("warning: %qd of DVMA space lost\n", (long long)sgsize);
+		printf("warning: %s: %" PRId64 " of DVMA space lost\n",
+		    __func__, sgsize);
 
 	/* Clear the map */
 }
@@ -929,12 +932,14 @@
 
 fail:
 	s = splhigh();
-	/* How can this fail?  And if it does what can we do? */
 	err = extent_free(is->is_dvmamap, map->_dm_dvmastart, sgsize,
 	    EX_NOWAIT);
 	map->_dm_dvmastart = 0;
 	map->_dm_dvmasize = 0;
 	splx(s);
+	if (err != 0)
+		printf("warning: %s: %" PRId64 " of DVMA space lost\n",
+		    __func__, sgsize);
 	return (EFBIG);
 }
 

Reply via email to