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

Function pmap_unmapdev

freebsd/kern/subr_devmap.c:327–342  ·  view source on GitHub ↗

* Unmap device memory and free the kva space. */

Source from the content-addressed store, hash-verified

325 * Unmap device memory and free the kva space.
326 */
327void
328pmap_unmapdev(vm_offset_t va, vm_size_t size)
329{
330 vm_offset_t offset;
331
332 /* Nothing to do if we find the mapping in the static table. */
333 if (devmap_vtop((void*)va, size) != DEVMAP_PADDR_NOTFOUND)
334 return;
335
336 offset = va & PAGE_MASK;
337 va = trunc_page(va);
338 size = round_page(size + offset);
339
340 pmap_kremove_device(va, size);
341 kva_free(va, size);
342}
343
344#ifdef DDB
345#include <ddb/ddb.h>

Callers

nothing calls this directly

Calls 3

devmap_vtopFunction · 0.85
kva_freeFunction · 0.85
pmap_kremove_deviceFunction · 0.50

Tested by

no test coverage detected