summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-02-26 10:53:02 +0000
committerkib <kib@FreeBSD.org>2017-02-26 10:53:02 +0000
commit9819b36e61acfd5bb1d5649008d08e8a4426eb55 (patch)
treea000319ded9542ca2bb5e82789f2d20e2d13f53a /sys/i386
parent1a38ee169aa4c23a64b45b79b51a953808108166 (diff)
downloadFreeBSD-src-9819b36e61acfd5bb1d5649008d08e8a4426eb55.zip
FreeBSD-src-9819b36e61acfd5bb1d5649008d08e8a4426eb55.tar.gz
MFC r313933, r313939, r313966:
Microoptimize pmap_protect_pde() on amd64, i386 and pmap_protect_pte1() on armv6.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/pmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index ed87fc4..db71c4d 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -3146,12 +3146,12 @@ pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, vm_prot_t prot)
anychanged = FALSE;
retry:
oldpde = newpde = *pde;
- if (oldpde & PG_MANAGED) {
+ if ((oldpde & (PG_MANAGED | PG_M | PG_RW)) ==
+ (PG_MANAGED | PG_M | PG_RW)) {
eva = sva + NBPDR;
for (va = sva, m = PHYS_TO_VM_PAGE(oldpde & PG_PS_FRAME);
va < eva; va += PAGE_SIZE, m++)
- if ((oldpde & (PG_M | PG_RW)) == (PG_M | PG_RW))
- vm_page_dirty(m);
+ vm_page_dirty(m);
}
if ((prot & VM_PROT_WRITE) == 0)
newpde &= ~(PG_RW | PG_M);
OpenPOWER on IntegriCloud