diff options
author | alc <alc@FreeBSD.org> | 2004-06-16 07:51:19 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-06-16 07:51:19 +0000 |
commit | 315177e2ec1ca3abcbf7ba544d72b1c88d464eaf (patch) | |
tree | 86909549ce40ed08ce11288ab1fe60695deb4a72 /sys | |
parent | f7f06b3719096ad6c994660f2e260abc340687e3 (diff) | |
download | FreeBSD-src-315177e2ec1ca3abcbf7ba544d72b1c88d464eaf.zip FreeBSD-src-315177e2ec1ca3abcbf7ba544d72b1c88d464eaf.tar.gz |
Add some lock assertions. Lock a small part of pmap_enter().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 864a39f..e87c239 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1438,6 +1438,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) pv_entry_t pv; int rtval; + PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->md.pv_list_count < pmap->pm_stats.resident_count) { TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { @@ -1498,6 +1499,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t va) pt_entry_t oldpte; vm_page_t m, mpte; + PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = pte_load_clear(ptq); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; @@ -1943,7 +1945,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if (opa) { int err; vm_page_lock_queues(); + PMAP_LOCK(pmap); err = pmap_remove_pte(pmap, pte, va); + PMAP_UNLOCK(pmap); vm_page_unlock_queues(); if (err) panic("pmap_enter: pte vanished, va: 0x%lx", va); |