summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2004-11-13 14:54:31 +0000
committercognet <cognet@FreeBSD.org>2004-11-13 14:54:31 +0000
commit341a002b6b0adc4c9c5fff4cab583a91a4ae565c (patch)
tree8ff263d14daad888906da7d72bd252c341961714
parent35680a9d48f72383c921dc62f17421f25a725104 (diff)
downloadFreeBSD-src-341a002b6b0adc4c9c5fff4cab583a91a4ae565c.zip
FreeBSD-src-341a002b6b0adc4c9c5fff4cab583a91a4ae565c.tar.gz
Don't forget to clear the PG_WRITEABLE flag when appropriate.
-rw-r--r--sys/arm/arm/pmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c
index f61e790..094ecf1 100644
--- a/sys/arm/arm/pmap.c
+++ b/sys/arm/arm/pmap.c
@@ -1668,6 +1668,8 @@ pmap_clearbit(struct vm_page *pg, u_int maskbits)
simple_unlock(&pg->mdpage.pvh_slock);
PMAP_HEAD_TO_MAP_UNLOCK();
#endif
+ if (maskbits & PVF_WRITE)
+ vm_page_flag_clear(pg, PG_WRITEABLE);
return (count);
}
@@ -1789,6 +1791,8 @@ pmap_nuke_pv(struct vm_page *pg, pmap_t pm, struct pv_entry *pve)
pg->md.urw_mappings--;
else
pg->md.uro_mappings--;
+ if (TAILQ_FIRST(&pg->md.pv_list) == NULL)
+ vm_page_flag_clear(pg, PG_WRITEABLE);
}
static struct pv_entry *
@@ -3691,6 +3695,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t eva)
pmap_acquire_pmap_lock(pm);
#endif
+ vm_page_lock_queues();
pmap_update(pm);
if (!pmap_is_current(pm)) {
cleanlist_idx = PMAP_REMOVE_CLEAN_LIST_SIZE + 1;
@@ -3847,6 +3852,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t eva)
pmap_free_l2_bucket(pm, l2b, mappings);
}
+ vm_page_unlock_queues();
if (flushall)
cpu_tlb_flushID();
#if 0
OpenPOWER on IntegriCloud