1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-23 16:01:42 +00:00

MFamd64/i386

Avoid recomputing PHYS_TO_VM_PAGE() unnecessarily in pmap_protect().
This commit is contained in:
Alan Cox 2004-09-19 05:34:49 +00:00
parent 346763649a
commit 6134d96917
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135456

View File

@ -1629,7 +1629,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
oldpte |= (PG_FOR | PG_FOE);
}
if ((oldpte & PG_FOW) == 0) {
m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte));
if (m == NULL)
m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte));
if (pmap_track_modified(sva))
vm_page_dirty(m);
oldpte |= PG_FOW;