Eliminate unnecessary uses of PHYS_TO_VM_PAGE() from pmap_enter(). These

uses predate the change in the pmap_enter() interface that replaced the
page's physical address by the address of its vm_page structure.  The
PHYS_TO_VM_PAGE() was being used to compute the address of the same vm_page
structure that was being passed in.
This commit is contained in:
Alan Cox 2004-10-02 07:34:58 +00:00
parent bbda1f18d9
commit 07b3303943
4 changed files with 8 additions and 20 deletions

View File

@ -1717,11 +1717,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
*/
if (origpte & PG_MANAGED) {
if ((origpte & PG_FOW) != PG_FOW
&& pmap_track_modified(va)) {
vm_page_t om;
om = PHYS_TO_VM_PAGE(opa);
vm_page_dirty(om);
}
&& pmap_track_modified(va))
vm_page_dirty(m);
}
managed = origpte & PG_MANAGED;

View File

@ -1921,11 +1921,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
* so we go ahead and sense modify status.
*/
if (origpte & PG_MANAGED) {
if ((origpte & PG_M) && pmap_track_modified(va)) {
vm_page_t om;
om = PHYS_TO_VM_PAGE(opa);
vm_page_dirty(om);
}
if ((origpte & PG_M) && pmap_track_modified(va))
vm_page_dirty(m);
pa |= PG_MANAGED;
}
goto validate;

View File

@ -1986,11 +1986,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
* so we go ahead and sense modify status.
*/
if (origpte & PG_MANAGED) {
if ((origpte & PG_M) && pmap_track_modified(va)) {
vm_page_t om;
om = PHYS_TO_VM_PAGE(opa);
vm_page_dirty(om);
}
if ((origpte & PG_M) && pmap_track_modified(va))
vm_page_dirty(m);
pa |= PG_MANAGED;
}
goto validate;

View File

@ -1550,11 +1550,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
* so we go ahead and sense modify status.
*/
if (managed && pmap_lpte_dirty(&origpte) &&
pmap_track_modified(va)) {
vm_page_t om;
om = PHYS_TO_VM_PAGE(opa);
vm_page_dirty(om);
}
pmap_track_modified(va))
vm_page_dirty(m);
goto validate;
}