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

Function pmap_is_prefaultable

freebsd/amd64/amd64/pmap.c:8289–8306  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

8287 * for prefault.
8288 */
8289boolean_t
8290pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr)
8291{
8292 pd_entry_t *pde;
8293 pt_entry_t *pte, PG_V;
8294 boolean_t rv;
8295
8296 PG_V = pmap_valid_bit(pmap);
8297 rv = FALSE;
8298 PMAP_LOCK(pmap);
8299 pde = pmap_pde(pmap, addr);
8300 if (pde != NULL && (*pde & (PG_PS | PG_V)) == PG_V) {
8301 pte = pmap_pde_to_pte(pde, addr);
8302 rv = (*pte & PG_V) == 0;
8303 }
8304 PMAP_UNLOCK(pmap);
8305 return (rv);
8306}
8307
8308/*
8309 * pmap_is_referenced:

Callers

nothing calls this directly

Calls 3

pmap_valid_bitFunction · 0.85
pmap_pdeFunction · 0.70
pmap_pde_to_pteFunction · 0.70

Tested by

no test coverage detected