Module Name: src
Committed By: reinoud
Date: Fri Sep 9 12:41:12 UTC 2011
Modified Files:
src/sys/arch/usermode/usermode: pmap.c
Log Message:
Make pmap.c not so chatty unless we've enabled debug and verbose
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/usermode/usermode/pmap.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/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.58 src/sys/arch/usermode/usermode/pmap.c:1.59
--- src/sys/arch/usermode/usermode/pmap.c:1.58 Fri Sep 9 12:28:05 2011
+++ src/sys/arch/usermode/usermode/pmap.c Fri Sep 9 12:41:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.58 2011/09/09 12:28:05 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.59 2011/09/09 12:41:12 reinoud Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.58 2011/09/09 12:28:05 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.59 2011/09/09 12:41:12 reinoud Exp $");
#include "opt_memsize.h"
#include "opt_kmempages.h"
@@ -452,10 +452,13 @@
}
}
/* Otherwise, allocate a new entry and link it in after the head. */
- printf("pv_get: multiple mapped page ppn %"PRIdPTR", lpn %"PRIdPTR"\n",
- ppn, lpn);
-assert(ppn < phys_npages);
-assert(ppn >= 0);
+ aprint_debug("pv_get: multiple mapped page ppn %"PRIdPTR", "
+ "lpn %"PRIdPTR"\n", ppn, lpn);
+
+ /* extra sanity */
+ assert(ppn < phys_npages);
+ assert(ppn >= 0);
+
pv = pv_alloc();
if (pv == NULL)
return NULL;
@@ -507,8 +510,8 @@
/* if its not mapped in, we have a TBL fault */
if ((pv->pv_vflags & PV_MAPPEDIN) == 0) {
if (pv->pv_mmap_ppl != THUNK_PROT_NONE) {
- printf("%s: tlb fault page lpn %"PRIiPTR"\n", __func__,
- pv->pv_lpn);
+ aprint_debug("%s: tlb fault page lpn %"PRIiPTR"\n",
+ __func__, pv->pv_lpn);
pmap_page_activate(pv);
return true;
}