diff options
author | alc <alc@FreeBSD.org> | 2003-06-29 21:20:04 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-06-29 21:20:04 +0000 |
commit | 44509f207ffb90a4c042b0c0dc5a3e9d028286e1 (patch) | |
tree | cbf4164c252ea54c47f261463c387040c94342b3 /sys/ia64 | |
parent | a9748f6066b3fe0a5ff8421326c9be1cd9a1d5b5 (diff) | |
download | FreeBSD-src-44509f207ffb90a4c042b0c0dc5a3e9d028286e1.zip FreeBSD-src-44509f207ffb90a4c042b0c0dc5a3e9d028286e1.tar.gz |
- Export pmap_enter_quick() to the MI VM. This will permit the
implementation of a largely MI pmap_object_init_pt() for vnode-backed
objects. pmap_enter_quick() is implemented via pmap_enter() on sparc64
and powerpc.
- Correct a mismatch between pmap_object_init_pt()'s prototype and its
various implementations. (I plan to keep pmap_object_init_pt() as
the MD hook for device-backed objects on i386 and amd64.)
- Correct an error in ia64's pmap_enter_quick() and adjust its interface
to match the other versions. Discussed with: marcel
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 8b8e63f..e866e6f 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -267,7 +267,6 @@ static void ia64_protection_init(void); static pmap_t pmap_install(pmap_t); static void pmap_invalidate_all(pmap_t pmap); -static void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m); vm_offset_t pmap_steal_memory(vm_size_t size) @@ -1709,8 +1708,8 @@ validate: * but is *MUCH* faster than pmap_enter... */ -static void -pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m) +vm_page_t +pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte) { struct ia64_lpte *pte; pmap_t oldpmap; @@ -1719,7 +1718,7 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m) pte = pmap_find_pte(va); if (pte->pte_p) - return; + goto reinstall; /* * Enter on the PV list since its part of our managed memory. @@ -1737,8 +1736,9 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m) pmap_set_pte(pte, va, VM_PAGE_TO_PHYS(m), PTE_IG_MANAGED, PTE_PL_USER, PTE_AR_R); - +reinstall: pmap_install(oldpmap); + return (NULL); } /* @@ -1821,7 +1821,8 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); pmap_enter_quick(pmap, - addr + ia64_ptob(tmpidx), p); + addr + ia64_ptob(tmpidx), p, + NULL); VM_OBJECT_LOCK(object); vm_page_lock_queues(); vm_page_wakeup(p); @@ -1855,7 +1856,8 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); pmap_enter_quick(pmap, - addr + ia64_ptob(tmpidx), p); + addr + ia64_ptob(tmpidx), p, + NULL); VM_OBJECT_LOCK(object); vm_page_lock_queues(); vm_page_wakeup(p); @@ -1951,7 +1953,7 @@ pmap_prefault(pmap, addra, entry) } vm_page_busy(m); vm_page_unlock_queues(); - pmap_enter_quick(pmap, addr, m); + pmap_enter_quick(pmap, addr, m, NULL); vm_page_lock_queues(); vm_page_wakeup(m); } |