diff options
author | alc <alc@FreeBSD.org> | 2003-08-24 08:07:06 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-08-24 08:07:06 +0000 |
commit | 6a770a21be95df15f71c58036fd5dd8c49a20934 (patch) | |
tree | 5ef616bbc2bebba4b5ea2a487a5f428e451705f6 /sys/amd64 | |
parent | 059f203fe6d68672d637b3daa5302ecf8e3b304a (diff) | |
download | FreeBSD-src-6a770a21be95df15f71c58036fd5dd8c49a20934.zip FreeBSD-src-6a770a21be95df15f71c58036fd5dd8c49a20934.tar.gz |
Eliminate the last (direct) uses of vm_page_lookup() on the pte object.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5408d95..e862c82 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -904,10 +904,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) /* We just released a PT, unhold the matching PD */ vm_page_t pdpg; - pdpg = vm_page_lookup(pmap->pm_pteobj, NUPDE + - ((va >> PDPSHIFT) & (NUPDPE - 1))); - while (vm_page_sleep_if_busy(pdpg, FALSE, "pulook")) - vm_page_lock_queues(); + pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va)); vm_page_unhold(pdpg); if (pdpg->hold_count == 0) _pmap_unwire_pte_hold(pmap, va, pdpg); @@ -916,10 +913,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) /* We just released a PD, unhold the matching PDP */ vm_page_t pdppg; - pdppg = vm_page_lookup(pmap->pm_pteobj, NUPDE + NUPDPE + - ((va >> PML4SHIFT) & (NUPML4E - 1))); - while (vm_page_sleep_if_busy(pdppg, FALSE, "pulooK")) - vm_page_lock_queues(); + pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va)); vm_page_unhold(pdppg); if (pdppg->hold_count == 0) _pmap_unwire_pte_hold(pmap, va, pdppg); @@ -963,21 +957,12 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) static int pmap_unuse_pt(pmap_t pmap, vm_offset_t va, vm_page_t mpte) { - vm_pindex_t ptepindex; if (va >= VM_MAXUSER_ADDRESS) return 0; if (mpte == NULL) { - ptepindex = pmap_pde_pindex(va); - if (pmap->pm_pteobj->root && - pmap->pm_pteobj->root->pindex == ptepindex) { - mpte = pmap->pm_pteobj->root; - } else { - while ((mpte = vm_page_lookup(pmap->pm_pteobj, ptepindex)) != NULL && - vm_page_sleep_if_busy(mpte, FALSE, "pulook")) - vm_page_lock_queues(); - } + mpte = PHYS_TO_VM_PAGE(*pmap_pde(pmap, va)); } return pmap_unwire_pte_hold(pmap, va, mpte); |