diff options
author | alc <alc@FreeBSD.org> | 2010-11-01 02:22:48 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-11-01 02:22:48 +0000 |
commit | 0fbc128e602df74c4eca7289d17d2c11e5596ce3 (patch) | |
tree | 6d0547c9c9a2e16672babf88ed708db1d39b1d23 /sys/powerpc/aim/mmu_oea.c | |
parent | fb06d48daa9854ac101683fcb1998c479e659a0c (diff) | |
download | FreeBSD-src-0fbc128e602df74c4eca7289d17d2c11e5596ce3.zip FreeBSD-src-0fbc128e602df74c4eca7289d17d2c11e5596ce3.tar.gz |
Implement pmap_is_prefaultable().
Reviewed by: nwhitehorn
Diffstat (limited to 'sys/powerpc/aim/mmu_oea.c')
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 7814acc..5ba029c 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -304,6 +304,7 @@ vm_paddr_t moea_extract(mmu_t, pmap_t, vm_offset_t); vm_page_t moea_extract_and_hold(mmu_t, pmap_t, vm_offset_t, vm_prot_t); void moea_init(mmu_t); boolean_t moea_is_modified(mmu_t, vm_page_t); +boolean_t moea_is_prefaultable(mmu_t, pmap_t, vm_offset_t); boolean_t moea_is_referenced(mmu_t, vm_page_t); boolean_t moea_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea_map(mmu_t, vm_offset_t *, vm_offset_t, vm_offset_t, int); @@ -347,6 +348,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_extract_and_hold, moea_extract_and_hold), MMUMETHOD(mmu_init, moea_init), MMUMETHOD(mmu_is_modified, moea_is_modified), + MMUMETHOD(mmu_is_prefaultable, moea_is_prefaultable), MMUMETHOD(mmu_is_referenced, moea_is_referenced), MMUMETHOD(mmu_ts_referenced, moea_ts_referenced), MMUMETHOD(mmu_map, moea_map), @@ -1324,6 +1326,19 @@ moea_is_modified(mmu_t mmu, vm_page_t m) return (moea_query_bit(m, PTE_CHG)); } +boolean_t +moea_is_prefaultable(mmu_t mmu, pmap_t pmap, vm_offset_t va) +{ + struct pvo_entry *pvo; + boolean_t rv; + + PMAP_LOCK(pmap); + pvo = moea_pvo_find_va(pmap, va & ~ADDR_POFF, NULL); + rv = pvo == NULL || (pvo->pvo_pte.pte.pte_hi & PTE_VALID) == 0; + PMAP_UNLOCK(pmap); + return (rv); +} + void moea_clear_reference(mmu_t mmu, vm_page_t m) { |