MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_is_prefaultable

Function pmap_is_prefaultable

freebsd/mips/mips/pmap.c:3053–3069  ·  view source on GitHub ↗

* pmap_is_prefaultable: * * Return whether or not the specified virtual address is elgible * for prefault. */

Source from the content-addressed store, hash-verified

3051 * for prefault.
3052 */
3053boolean_t
3054pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr)
3055{
3056 pd_entry_t *pde;
3057 pt_entry_t *pte;
3058 boolean_t rv;
3059
3060 rv = FALSE;
3061 PMAP_LOCK(pmap);
3062 pde = pmap_pde(pmap, addr);
3063 if (pde != NULL && *pde != 0) {
3064 pte = pmap_pde_to_pte(pde, addr);
3065 rv = (*pte == 0);
3066 }
3067 PMAP_UNLOCK(pmap);
3068 return (rv);
3069}
3070
3071/*
3072 * Apply the given advice to the specified range of addresses within the

Callers 1

vm_fault_prefaultFunction · 0.50

Calls 2

pmap_pdeFunction · 0.70
pmap_pde_to_pteFunction · 0.70

Tested by

no test coverage detected