summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2005-08-14 20:02:50 +0000
committeralc <alc@FreeBSD.org>2005-08-14 20:02:50 +0000
commit481f28c27d950908b0be332ed2c72df1c0a6ec3b (patch)
treecf0051e2bc22777e1fe80994ffce82755bd6410f /sys/i386
parentb6cb84e76035f2382d7d4e5caf05bc29a0fd240a (diff)
downloadFreeBSD-src-481f28c27d950908b0be332ed2c72df1c0a6ec3b.zip
FreeBSD-src-481f28c27d950908b0be332ed2c72df1c0a6ec3b.tar.gz
Simplify the page table page reference counting by pmap_enter()'s change of
mapping case. Eliminate a stale comment from pmap_enter(). Reviewed by: tegge
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/pmap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index e5ad5fa..84e5bd5 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -1954,23 +1954,23 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
* handle validating new mapping.
*/
if (opa) {
- int err;
if (origpte & PG_W)
pmap->pm_stats.wired_count--;
if (origpte & PG_MANAGED) {
om = PHYS_TO_VM_PAGE(opa);
pmap_remove_entry(pmap, om, va);
}
- err = pmap_unuse_pt(pmap, va);
- if (err)
- panic("pmap_enter: pte vanished, va: 0x%x", va);
+ if (mpte != NULL) {
+ mpte->wire_count--;
+ KASSERT(mpte->wire_count > 0,
+ ("pmap_enter: missing reference to page table page,"
+ " va: 0x%x", va));
+ }
} else
pmap->pm_stats.resident_count++;
/*
- * Enter on the PV list if part of our managed memory. Note that we
- * raise IPL while manipulating pv_table since pmap_enter can be
- * called at interrupt time.
+ * Enter on the PV list if part of our managed memory.
*/
if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) {
pmap_insert_entry(pmap, va, m);
OpenPOWER on IntegriCloud