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

Function pmap_allocpte_free_unref

freebsd/amd64/amd64/pmap.c:4266–4279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4264}
4265
4266static void
4267pmap_allocpte_free_unref(pmap_t pmap, vm_offset_t va, pt_entry_t *pte)
4268{
4269 vm_page_t mpg;
4270 struct spglist free;
4271
4272 mpg = PHYS_TO_VM_PAGE(*pte & PG_FRAME);
4273 if (mpg->ref_count != 0)
4274 return;
4275 SLIST_INIT(&free);
4276 _pmap_unwire_ptp(pmap, va, mpg, &free);
4277 pmap_invalidate_page(pmap, va);
4278 vm_page_free_pages_toq(&free, true);
4279}
4280
4281static pml4_entry_t *
4282pmap_allocpte_getpml4(pmap_t pmap, struct rwlock **lockp, vm_offset_t va,

Callers 2

pmap_allocpte_getpdpFunction · 0.85
pmap_allocpte_nosleepFunction · 0.85

Calls 4

PHYS_TO_VM_PAGEFunction · 0.85
vm_page_free_pages_toqFunction · 0.85
_pmap_unwire_ptpFunction · 0.70
pmap_invalidate_pageFunction · 0.70

Tested by

no test coverage detected