Subject: Re: anyone seen *this* panic?
To: None <port-mac68k@netbsd.org>
From: Allen Briggs <briggs@wasabisystems.com>
List: port-mac68k
Date: 02/12/2001 19:30:32
--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I took Chuck's pointer and created a patch for the
"uvm_fault_unwire_locked: unwiring non-wired memory" panic.
The patch is attached. It's also committed as revision 1.69
of src/sys/arch/mac68k/mac68k/pmap.c, which you should be able
to get (sometime soon, if not now) from your local anoncvs
server.
Let me know if this doesn't fix the problem for you.
-allen
--
Allen Briggs briggs@wasabisystems.com
http://www.wasabisystems.com/ Quality NetBSD CDs, Sales, Support, Service
--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ptch
Index: pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mac68k/mac68k/pmap.c,v
retrieving revision 1.69
diff -u -r1.69 pmap.c
--- pmap.c 2001/01/14 03:29:32 1.69
+++ pmap.c 2001/02/12 21:57:17
@@ -302,6 +302,7 @@
* Internal routines
*/
void pmap_remove_mapping __P((pmap_t, vaddr_t, pt_entry_t *, int));
+void pmap_do_remove __P((pmap_t, vaddr_t, vaddr_t, int));
boolean_t pmap_testbit __P((paddr_t, int));
void pmap_changebit __P((paddr_t, int, int));
void pmap_enter_ptpage __P((pmap_t, vaddr_t));
@@ -888,9 +889,17 @@
pmap_t pmap;
vaddr_t sva, eva;
{
+ pmap_do_remove(pmap, sva, eva, 1);
+}
+
+void
+pmap_do_remove(pmap, sva, eva, remove_wired)
+ pmap_t pmap;
+ vaddr_t sva, eva;
+ int remove_wired;
+{
vaddr_t nssva;
pt_entry_t *pte;
- boolean_t firstpage, needcflush;
int flags;
PMAP_DPRINTF(PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT,
@@ -899,8 +908,6 @@
if (pmap == NULL)
return;
- firstpage = TRUE;
- needcflush = FALSE;
flags = active_pmap(pmap) ? PRM_TFLUSH : 0;
while (sva < eva) {
nssva = mac68k_trunc_seg(sva) + MAC_SEG_SIZE;
@@ -916,22 +923,18 @@
}
/*
* Invalidate every valid mapping within this segment.
+ * If remove_wired is zero, skip the wired pages.
*/
pte = pmap_pte(pmap, sva);
while (sva < nssva) {
- if (pmap_pte_v(pte)) {
+ if (pmap_pte_v(pte) &&
+ (remove_wired || !pmap_pte_w(pte))) {
pmap_remove_mapping(pmap, sva, pte, flags);
- firstpage = FALSE;
}
pte++;
sva += NBPG;
}
}
- /*
- * Didn't do anything, no need for cache flushes
- */
- if (firstpage)
- return;
}
/*
@@ -1503,7 +1506,7 @@
* entire address space. Note: pmap_remove() performs
* all necessary locking.
*/
- pmap_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS);
+ pmap_do_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS, 0);
}
#ifdef notyet
--azLHFNyN32YCQGCU--