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

Function pmap_page_is_mapped

freebsd/arm64/arm64/pmap.c:5054–5069  ·  view source on GitHub ↗

* Returns true if the given page is mapped individually or as part of * a 2mpage. Otherwise, returns false. */

Source from the content-addressed store, hash-verified

5052 * a 2mpage. Otherwise, returns false.
5053 */
5054bool
5055pmap_page_is_mapped(vm_page_t m)
5056{
5057 struct rwlock *lock;
5058 bool rv;
5059
5060 if ((m->oflags & VPO_UNMANAGED) != 0)
5061 return (false);
5062 lock = VM_PAGE_TO_PV_LIST_LOCK(m);
5063 rw_rlock(lock);
5064 rv = !TAILQ_EMPTY(&m->md.pv_list) ||
5065 ((m->flags & PG_FICTITIOUS) == 0 &&
5066 !TAILQ_EMPTY(&page_to_pvh(m)->pv_list));
5067 rw_runlock(lock);
5068 return (rv);
5069}
5070
5071/*
5072 * Destroy all managed, non-wired mappings in the given user-space

Callers

nothing calls this directly

Calls 1

page_to_pvhFunction · 0.85

Tested by

no test coverage detected