Module Name:    src
Committed By:   hans
Date:           Thu Oct  7 19:39:31 UTC 2010

Modified Files:
        src/sys/arch/alpha/common: sgmap_typedep.c

Log Message:
fix SGMAP_DEBUG on alpha


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/common/sgmap_typedep.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/alpha/common/sgmap_typedep.c
diff -u src/sys/arch/alpha/common/sgmap_typedep.c:1.35 src/sys/arch/alpha/common/sgmap_typedep.c:1.36
--- src/sys/arch/alpha/common/sgmap_typedep.c:1.35	Mon Apr 28 20:23:11 2008
+++ src/sys/arch/alpha/common/sgmap_typedep.c	Thu Oct  7 19:39:30 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap_typedep.c,v 1.35 2008/04/28 20:23:11 martin Exp $ */
+/* $NetBSD: sgmap_typedep.c,v 1.36 2010/10/07 19:39:30 hans Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sgmap_typedep.c,v 1.35 2008/04/28 20:23:11 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sgmap_typedep.c,v 1.36 2010/10/07 19:39:30 hans Exp $");
 
 #include "opt_ddb.h"
 
@@ -121,9 +121,12 @@
 		}
 	}
 
-#if 0
-	printf("len 0x%lx -> 0x%lx, boundary 0x%lx -> 0x%lx -> ",
-	    (endva - va), sgvalen, map->_dm_boundary, boundary);
+#ifdef SGMAP_DEBUG
+	if (__C(SGMAP_TYPE,_debug)) {
+		printf("sgmap_load: va:endva = 0x%lx:0x%lx\n", va, endva);
+		printf("sgmap_load: sgvalen = 0x%lx, boundary = 0x%lx\n",
+		       sgvalen, boundary);
+	}
 #endif
 
 	s = splvm();
@@ -133,10 +136,6 @@
 	if (error)
 		return (error);
 
-#if 0
-	printf("error %d sgva 0x%lx\n", error, sgva);
-#endif
-
 	pteidx = sgva >> SGMAP_ADDR_PTEIDX_SHIFT;
 	pte = &page_table[pteidx * SGMAP_PTE_SPACING];
 
@@ -153,8 +152,8 @@
 
 #ifdef SGMAP_DEBUG
 	if (__C(SGMAP_TYPE,_debug))
-		printf("sgmap_load: wbase = 0x%lx, vpage = 0x%x, "
-		    "DMA addr = 0x%lx\n", sgmap->aps_wbase, sgva,
+		printf("sgmap_load: wbase = 0x%lx, vpage = 0x%lx, "
+		    "DMA addr = 0x%lx\n", sgmap->aps_wbase, (uint64_t)sgva,
 		    map->dm_segs[seg].ds_addr);
 #endif
 
@@ -181,9 +180,7 @@
 #ifdef SGMAP_DEBUG
 		if (__C(SGMAP_TYPE,_debug)) {
 			printf("sgmap_load:     spill page, pte = %p, "
-			    "*pte = 0x%lx\n", pte, *pte);
-			printf("sgmap_load:     pte count = %d\n",
-			    map->_dm_ptecnt);
+			    "*pte = 0x%lx\n", pte, (uint64_t)*pte);
 		}
 #endif
 	}

Reply via email to