summaryrefslogtreecommitdiffstats
path: root/sys/arm/arm/pmap-v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm/arm/pmap-v6.c')
-rw-r--r--sys/arm/arm/pmap-v6.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c
index 9e0b8bd..c0f4c2c 100644
--- a/sys/arm/arm/pmap-v6.c
+++ b/sys/arm/arm/pmap-v6.c
@@ -2470,7 +2470,6 @@ pmap_remove_all(vm_page_t m)
else
cpu_tlb_flushD();
}
- vm_page_aflag_clear(m, PGA_WRITEABLE);
rw_wunlock(&pvh_global_lock);
}
@@ -2801,8 +2800,13 @@ validate:
}
if (prot & VM_PROT_WRITE) {
- /* Write enable */
- npte &= ~(L2_APX);
+ /*
+ * Enable write permission if the access type
+ * indicates write intention. Emulate modified
+ * bit otherwise.
+ */
+ if ((access & VM_PROT_WRITE) != 0)
+ npte &= ~(L2_APX);
if ((m->oflags & VPO_UNMANAGED) == 0) {
vm_page_aflag_set(m, PGA_WRITEABLE);
OpenPOWER on IntegriCloud