Module Name: src
Committed By: hannken
Date: Fri Jan 25 17:12:33 UTC 2013
Modified Files:
src/sys/arch/sparc64/sparc64: pmap.c
Log Message:
Update the DEBUG section at the tail of pmap_clear_modify().
Nothing prevents page modification after the modify bit was
cleared but before the DEBUG section checks pmap_is_modified(),
so remove this check.
For the same reason "modified" and "changed" may differ, so only
check "modified" implies "changed" here.
Ok: Matthew Green <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.279 src/sys/arch/sparc64/sparc64/pmap.c:1.280
--- src/sys/arch/sparc64/sparc64/pmap.c:1.279 Thu Jan 3 09:40:55 2013
+++ src/sys/arch/sparc64/sparc64/pmap.c Fri Jan 25 17:12:33 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.279 2013/01/03 09:40:55 martin Exp $ */
+/* $NetBSD: pmap.c,v 1.280 2013/01/25 17:12:33 hannken Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.279 2013/01/03 09:40:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.280 2013/01/25 17:12:33 hannken Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@@ -2577,17 +2577,13 @@ pmap_clear_modify(struct vm_page *pg)
pv_check();
mutex_exit(&pmap_lock);
#ifdef DEBUG
- if (pmap_is_modified(pg)) {
- printf("pmap_clear_modify(): %p still modified!\n", pg);
- Debugger();
- }
DPRINTF(PDB_CHANGEPROT|PDB_REF, ("pmap_clear_modify: pg %p %s\n", pg,
(changed ? "was modified" : "was not modified")));
- if (modified != changed) {
+ if (modified && modified != changed) {
printf("pmap_clear_modify: modified %d changed %d\n",
modified, changed);
Debugger();
- } else return (modified);
+ }
#endif
return (changed);
}