1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Fixed some page table reference count problems; these changes may not be

complete, but should be closer to correct than before.
This commit is contained in:
David Greenman 1995-01-15 09:06:23 +00:00
parent d94fc6a011
commit 7082ec8aa5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5642
2 changed files with 10 additions and 6 deletions

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * 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); pv = pa_to_pvh(pa);
pmap_remove_entry(pmap, pv, sva); pmap_remove_entry(pmap, pv, sva);
pmap_unuse_pt(pmap, sva);
} }
pmap_unuse_pt(pmap, sva);
pmap_update(); pmap_update();
return; return;
} }
@ -981,6 +981,7 @@ pmap_remove(pmap, sva, eva)
*/ */
pa = ((int)oldpte) & PG_FRAME; pa = ((int)oldpte) & PG_FRAME;
if (!pmap_is_managed(pa)) { if (!pmap_is_managed(pa)) {
pmap_unuse_pt(pmap, va);
++sva; ++sva;
continue; continue;
} }
@ -1029,6 +1030,7 @@ pmap_remove_all(pa)
/* /*
* Not one of ours * Not one of ours
*/ */
/* XXX this makes pmap_page_protect(NONE) illegal for non-managed pages! */
if (!pmap_is_managed(pa)) if (!pmap_is_managed(pa))
return; return;
@ -1061,8 +1063,8 @@ pmap_remove_all(pa)
} }
*pte = 0; *pte = 0;
pmap_unuse_pt(pmap, va);
} }
pmap_unuse_pt(pmap, va);
npv = pv->pv_next; npv = pv->pv_next;
if (npv) { if (npv) {

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * 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); pv = pa_to_pvh(pa);
pmap_remove_entry(pmap, pv, sva); pmap_remove_entry(pmap, pv, sva);
pmap_unuse_pt(pmap, sva);
} }
pmap_unuse_pt(pmap, sva);
pmap_update(); pmap_update();
return; return;
} }
@ -981,6 +981,7 @@ pmap_remove(pmap, sva, eva)
*/ */
pa = ((int)oldpte) & PG_FRAME; pa = ((int)oldpte) & PG_FRAME;
if (!pmap_is_managed(pa)) { if (!pmap_is_managed(pa)) {
pmap_unuse_pt(pmap, va);
++sva; ++sva;
continue; continue;
} }
@ -1029,6 +1030,7 @@ pmap_remove_all(pa)
/* /*
* Not one of ours * Not one of ours
*/ */
/* XXX this makes pmap_page_protect(NONE) illegal for non-managed pages! */
if (!pmap_is_managed(pa)) if (!pmap_is_managed(pa))
return; return;
@ -1061,8 +1063,8 @@ pmap_remove_all(pa)
} }
*pte = 0; *pte = 0;
pmap_unuse_pt(pmap, va);
} }
pmap_unuse_pt(pmap, va);
npv = pv->pv_next; npv = pv->pv_next;
if (npv) { if (npv) {