I believe UVM is clean now and no managed pages should be in use anymore
authorkettenis <kettenis@openbsd.org>
Wed, 8 Apr 2015 14:02:43 +0000 (14:02 +0000)
committerkettenis <kettenis@openbsd.org>
Wed, 8 Apr 2015 14:02:43 +0000 (14:02 +0000)
when we call pmap_release().  Turn debug code into printf and remove the code
that tried to mop up.  Override Debugger() such that it inserts a trap
instruction directly into the code such that we get useful backtraces.

This way I don't need to worry about pmap_release() removing pv entries when
making this pmap mpsafe.

sys/arch/sparc64/sparc64/pmap.c

index e657af8..9a15512 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pmap.c,v 1.88 2015/02/15 21:34:33 miod Exp $  */
+/*     $OpenBSD: pmap.c,v 1.89 2015/04/08 14:02:43 kettenis Exp $      */
 /*     $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $   */
 #undef NO_VCACHE /* Don't forget the locked TLB in dostart */
 /*
@@ -58,6 +58,7 @@
 #include <ddb/db_extern.h>
 #include <ddb/db_access.h>
 #include <ddb/db_output.h>
+#define Debugger()     __asm volatile("ta 1; nop");
 #else
 #define Debugger()
 #define db_printf      printf
@@ -1522,18 +1523,9 @@ pmap_release(struct pmap *pm)
                                                pa = data & TLB_PA_MASK;
                                                pv = pa_to_pvh(pa);
                                                if (pv != NULL) {
-
-#ifdef DEBUG
                                                        printf("pmap_release: pm=%p page %llx still in use\n", pm, 
                                                               (unsigned long long)(((u_int64_t)i<<STSHIFT)|((u_int64_t)k<<PDSHIFT)|((u_int64_t)j<<PTSHIFT)));
                                                        Debugger();
-#endif
-                                                       /* Save REF/MOD info */
-                                                       pv->pv_va |= pmap_tte2flags(data);
-
-                                                       pmap_remove_pv(pm, 
-                                                                      (long)((u_int64_t)i<<STSHIFT)|((long)k<<PDSHIFT)|((long)j<<PTSHIFT), 
-                                                                      pa);
                                                }
                                        }
                                        stxa(pdirentp, ASI_PHYS_CACHED, 0);