aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-02-19 20:40:07 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-02-19 20:40:07 +0000
commit901b55218f26a7c5c15414abcb5da98f33aaf1b4 (patch)
tree7e20ad05bab7b1d25544aad698619edbe71f1aa9 /sys
parent5057f6560663c73932639c33d7b138c634d3ef99 (diff)
downloadsrc-901b55218f26a7c5c15414abcb5da98f33aaf1b4.tar.gz
src-901b55218f26a7c5c15414abcb5da98f33aaf1b4.zip
MFamd64 r313933: microoptimize pmap_protect_pte1().
Noted by: alc Tested by: mmel Sponsored by: The FreeBSD Foundation MFC after: 1 week
Notes
Notes: svn path=/head/; revision=313966
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/arm/pmap-v6.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c
index d8645b718cd2..c25bbd061dad 100644
--- a/sys/arm/arm/pmap-v6.c
+++ b/sys/arm/arm/pmap-v6.c
@@ -4799,12 +4799,11 @@ pmap_protect_pte1(pmap_t pmap, pt1_entry_t *pte1p, vm_offset_t sva,
("%s: sva is not 1mpage aligned", __func__));
opte1 = npte1 = pte1_load(pte1p);
- if (pte1_is_managed(opte1)) {
+ if (pte1_is_managed(opte1) && pte1_is_dirty(opte1)) {
eva = sva + PTE1_SIZE;
for (va = sva, m = PHYS_TO_VM_PAGE(pte1_pa(opte1));
va < eva; va += PAGE_SIZE, m++)
- if (pte1_is_dirty(opte1))
- vm_page_dirty(m);
+ vm_page_dirty(m);
}
if ((prot & VM_PROT_WRITE) == 0)
npte1 |= PTE1_RO | PTE1_NM;