diff options
author | Mark Johnston <markj@FreeBSD.org> | 2019-09-09 21:32:42 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2019-09-09 21:32:42 +0000 |
commit | fee2a2fa39834d8d5eaa981298fce9d2ed31546d (patch) | |
tree | 290b84257a055cb0fbd4eb498ca16690ad749aa3 /sys/powerpc/booke/pmap.c | |
parent | 58a11be1cf32a2ad832d7167bd41819cb105851e (diff) | |
download | src-fee2a2fa39834d8d5eaa981298fce9d2ed31546d.tar.gz src-fee2a2fa39834d8d5eaa981298fce9d2ed31546d.zip |
Notes
Diffstat (limited to 'sys/powerpc/booke/pmap.c')
-rw-r--r-- | sys/powerpc/booke/pmap.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index 26b09661ffd9..140b1367325f 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -2790,12 +2790,9 @@ mmu_booke_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_offset_t va, pte_t *pte; vm_page_t m; uint32_t pte_wbit; - vm_paddr_t pa; - + m = NULL; - pa = 0; PMAP_LOCK(pmap); -retry: pte = pte_find(mmu, pmap, va); if ((pte != NULL) && PTE_ISVALID(pte)) { if (pmap == kernel_pmap) @@ -2803,15 +2800,12 @@ retry: else pte_wbit = PTE_UW; - if ((*pte & pte_wbit) || ((prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, PTE_PA(pte), &pa)) - goto retry; + if ((*pte & pte_wbit) != 0 || (prot & VM_PROT_WRITE) == 0) { m = PHYS_TO_VM_PAGE(PTE_PA(pte)); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } - - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } |