- 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
This commit is contained in:
parent
3db879acd2
commit
dca96f1adc
@ -330,8 +330,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void alpha_protection_init(void);
|
||||
static void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
|
||||
|
||||
static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_page_t mpte);
|
||||
static int pmap_remove_pte(pmap_t pmap, pt_entry_t* ptq, vm_offset_t sva);
|
||||
static void pmap_remove_page(struct pmap *pmap, vm_offset_t va);
|
||||
static int pmap_remove_entry(struct pmap *pmap, vm_page_t m, vm_offset_t va);
|
||||
@ -1973,7 +1971,7 @@ validate:
|
||||
* but is *MUCH* faster than pmap_enter...
|
||||
*/
|
||||
|
||||
static vm_page_t
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
register pt_entry_t *pte;
|
||||
|
@ -208,8 +208,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void amd64_protection_init(void);
|
||||
static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
|
||||
|
||||
static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_page_t mpte);
|
||||
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
|
||||
static void pmap_remove_page(struct pmap *pmap, vm_offset_t va);
|
||||
static int pmap_remove_entry(struct pmap *pmap, vm_page_t m,
|
||||
@ -1951,7 +1949,7 @@ validate:
|
||||
* but is *MUCH* faster than pmap_enter...
|
||||
*/
|
||||
|
||||
static vm_page_t
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
pt_entry_t *pte;
|
||||
|
@ -243,8 +243,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void i386_protection_init(void);
|
||||
static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
|
||||
|
||||
static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_page_t mpte);
|
||||
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
|
||||
static void pmap_remove_page(struct pmap *pmap, vm_offset_t va);
|
||||
static int pmap_remove_entry(struct pmap *pmap, vm_page_t m,
|
||||
@ -2090,7 +2088,7 @@ validate:
|
||||
* but is *MUCH* faster than pmap_enter...
|
||||
*/
|
||||
|
||||
static vm_page_t
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
pt_entry_t *pte;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1032,6 +1032,14 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
pmap_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE);
|
||||
}
|
||||
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
|
||||
pmap_enter(pm, va, m, VM_PROT_READ | VM_PROT_EXECUTE, FALSE);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_extract(pmap_t pm, vm_offset_t va)
|
||||
{
|
||||
|
@ -1032,6 +1032,14 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
pmap_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE);
|
||||
}
|
||||
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
|
||||
pmap_enter(pm, va, m, VM_PROT_READ | VM_PROT_EXECUTE, FALSE);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_extract(pmap_t pm, vm_offset_t va)
|
||||
{
|
||||
|
@ -1032,6 +1032,14 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
pmap_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE);
|
||||
}
|
||||
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
|
||||
pmap_enter(pm, va, m, VM_PROT_READ | VM_PROT_EXECUTE, FALSE);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_extract(pmap_t pm, vm_offset_t va)
|
||||
{
|
||||
|
@ -1331,6 +1331,14 @@ pmap_enter(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
}
|
||||
}
|
||||
|
||||
vm_page_t
|
||||
pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_page_t mpte)
|
||||
{
|
||||
|
||||
pmap_enter(pm, va, m, VM_PROT_READ | VM_PROT_EXECUTE, FALSE);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
void
|
||||
pmap_object_init_pt(pmap_t pm, vm_offset_t addr, vm_object_t object,
|
||||
vm_pindex_t pindex, vm_size_t size, int limit)
|
||||
|
@ -103,6 +103,8 @@ void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t);
|
||||
void pmap_copy_page(vm_page_t, vm_page_t);
|
||||
void pmap_enter(pmap_t, vm_offset_t, vm_page_t, vm_prot_t,
|
||||
boolean_t);
|
||||
vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m,
|
||||
vm_page_t mpte);
|
||||
vm_paddr_t pmap_extract(pmap_t pmap, vm_offset_t va);
|
||||
void pmap_growkernel(vm_offset_t);
|
||||
void pmap_init(vm_paddr_t, vm_paddr_t);
|
||||
@ -110,7 +112,7 @@ boolean_t pmap_is_modified(vm_page_t m);
|
||||
boolean_t pmap_ts_referenced(vm_page_t m);
|
||||
vm_offset_t pmap_map(vm_offset_t *, vm_paddr_t, vm_paddr_t, int);
|
||||
void pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
|
||||
vm_object_t object, vm_pindex_t pindex, vm_offset_t size,
|
||||
vm_object_t object, vm_pindex_t pindex, vm_size_t size,
|
||||
int pagelimit);
|
||||
boolean_t pmap_page_exists_quick(pmap_t pmap, vm_page_t m);
|
||||
void pmap_page_protect(vm_page_t m, vm_prot_t prot);
|
||||
|
Loading…
x
Reference in New Issue
Block a user