diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2010-06-06 21:19:04 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2010-06-06 21:19:04 +0000 |
commit | 970c23b2e61f3919cb38967ca9249e9fd6307034 (patch) | |
tree | 0f9e7173d7c2fa0270beea8d91a3938b339f81cc /sys/ia64 | |
parent | 7708106a086eecd7aa877d9d2d2c5f6b9085a0f3 (diff) | |
parent | 8ce4a9a2556f92ccc058efae9b381a7fc32a0a70 (diff) | |
download | src-970c23b2e61f3919cb38967ca9249e9fd6307034.tar.gz src-970c23b2e61f3919cb38967ca9249e9fd6307034.zip |
Merge svn+ssh://svn.freebsd.org/base/head@208879
Notes
Notes:
svn path=/projects/altix/; revision=208880
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 86f3ea164c49..373d019e184c 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -800,8 +800,6 @@ retry: TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_EMPTY(&m->md.pv_list)) - vm_page_flag_clear(m, PG_WRITEABLE); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); if (allocated_pv == NULL) @@ -809,6 +807,8 @@ retry: else free_pv_entry(pv); } + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_flag_clear(m, PG_WRITEABLE); } if (allocated_pv == NULL) { if (vpq == &vm_page_queues[PQ_INACTIVE]) { @@ -1595,7 +1595,7 @@ validate: if (icache_inval) ia64_sync_icache(va, PAGE_SIZE); - if ((prot & VM_PROT_WRITE) != 0) + if ((prot & VM_PROT_WRITE) != 0 && managed) vm_page_flag_set(m, PG_WRITEABLE); vm_page_unlock_queues(); pmap_switch(oldpmap); @@ -1625,12 +1625,14 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED); psize = atop(end - start); m = m_start; + vm_page_lock_queues(); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_quick_locked(pmap, start + ptoa(diff), m, prot); m = TAILQ_NEXT(m, listq); } + vm_page_unlock_queues(); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } @@ -2041,9 +2043,10 @@ pmap_is_referenced(vm_page_t m) pv_entry_t pv; boolean_t rv; + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0, + ("pmap_is_referenced: page %p is not managed", m)); rv = FALSE; - if (m->flags & PG_FICTITIOUS) - return (rv); + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { PMAP_LOCK(pv->pv_pmap); oldpmap = pmap_switch(pv->pv_pmap); @@ -2055,6 +2058,7 @@ pmap_is_referenced(vm_page_t m) if (rv) break; } + vm_page_unlock_queues(); return (rv); } |