Subject: debug code in pmap_emulate_reference
To: None <port-alpha@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: port-alpha
Date: 12/20/2004 21:03:13
hi,

as pmap_emulate_reference is no longer called by cpu_fork or cpu_swapin,
is it ok to enable the #if 0'ed debug code in it?

YAMAMOTO Takashi

Index: pmap.c
===================================================================
--- pmap.c	(revision 975)
+++ pmap.c	(working copy)
@@ -2771,12 +2771,6 @@ pmap_emulate_reference(struct lwp *l, va
 #ifdef DEBUG				/* These checks are more expensive */
 	if (!pmap_pte_v(pte))
 		panic("pmap_emulate_reference: invalid pte");
-#if 0
-	/*
-	 * Can't do these, because cpu_fork and cpu_swapin call
-	 * pmap_emulate_reference(), and the bits aren't guaranteed,
-	 * for them...
-	 */
 	if (type == ALPHA_MMCSR_FOW) {
 		if (!(*pte & (user ? PG_UWE : PG_UWE | PG_KWE)))
 			panic("pmap_emulate_reference: write but unwritable");
@@ -2788,7 +2782,6 @@ pmap_emulate_reference(struct lwp *l, va
 		if (!(*pte & (PG_FOR | PG_FOE)))
 			panic("pmap_emulate_reference: !write but not FOR|FOE");
 	}
-#endif
 	/* Other diagnostics? */
 #endif
 	pa = pmap_pte_pa(pte);