summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-01-15 09:06:23 +0000
committerdg <dg@FreeBSD.org>1995-01-15 09:06:23 +0000
commit3a5df73fbd191b4c3bf7bf10acb8dad8120fedc3 (patch)
treedcc61f284ed6bcd6b4632f3207ab95b455684d5f
parent846706f1033d76d914060a43473effddda178eb2 (diff)
downloadFreeBSD-src-3a5df73fbd191b4c3bf7bf10acb8dad8120fedc3.zip
FreeBSD-src-3a5df73fbd191b4c3bf7bf10acb8dad8120fedc3.tar.gz
Fixed some page table reference count problems; these changes may not be
complete, but should be closer to correct than before.
-rw-r--r--sys/amd64/amd64/pmap.c8
-rw-r--r--sys/i386/i386/pmap.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 73934e5..eb72d02 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.40 1995/01/09 16:04:38 davidg Exp $
+ * $Id: pmap.c,v 1.41 1995/01/14 04:58:53 davidg Exp $
*/
/*
@@ -906,8 +906,8 @@ pmap_remove(pmap, sva, eva)
pv = pa_to_pvh(pa);
pmap_remove_entry(pmap, pv, sva);
- pmap_unuse_pt(pmap, sva);
}
+ pmap_unuse_pt(pmap, sva);
pmap_update();
return;
}
@@ -981,6 +981,7 @@ pmap_remove(pmap, sva, eva)
*/
pa = ((int)oldpte) & PG_FRAME;
if (!pmap_is_managed(pa)) {
+ pmap_unuse_pt(pmap, va);
++sva;
continue;
}
@@ -1029,6 +1030,7 @@ pmap_remove_all(pa)
/*
* Not one of ours
*/
+ /* XXX this makes pmap_page_protect(NONE) illegal for non-managed pages! */
if (!pmap_is_managed(pa))
return;
@@ -1061,8 +1063,8 @@ pmap_remove_all(pa)
}
*pte = 0;
+ pmap_unuse_pt(pmap, va);
}
- pmap_unuse_pt(pmap, va);
npv = pv->pv_next;
if (npv) {
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 73934e5..eb72d02 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.40 1995/01/09 16:04:38 davidg Exp $
+ * $Id: pmap.c,v 1.41 1995/01/14 04:58:53 davidg Exp $
*/
/*
@@ -906,8 +906,8 @@ pmap_remove(pmap, sva, eva)
pv = pa_to_pvh(pa);
pmap_remove_entry(pmap, pv, sva);
- pmap_unuse_pt(pmap, sva);
}
+ pmap_unuse_pt(pmap, sva);
pmap_update();
return;
}
@@ -981,6 +981,7 @@ pmap_remove(pmap, sva, eva)
*/
pa = ((int)oldpte) & PG_FRAME;
if (!pmap_is_managed(pa)) {
+ pmap_unuse_pt(pmap, va);
++sva;
continue;
}
@@ -1029,6 +1030,7 @@ pmap_remove_all(pa)
/*
* Not one of ours
*/
+ /* XXX this makes pmap_page_protect(NONE) illegal for non-managed pages! */
if (!pmap_is_managed(pa))
return;
@@ -1061,8 +1063,8 @@ pmap_remove_all(pa)
}
*pte = 0;
+ pmap_unuse_pt(pmap, va);
}
- pmap_unuse_pt(pmap, va);
npv = pv->pv_next;
if (npv) {
OpenPOWER on IntegriCloud