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

Function vm_page_initfake

freebsd/vm/vm_page.c:1263–1287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1261}
1262
1263void
1264vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr)
1265{
1266
1267 if ((m->flags & PG_FICTITIOUS) != 0) {
1268 /*
1269 * The page's memattr might have changed since the
1270 * previous initialization. Update the pmap to the
1271 * new memattr.
1272 */
1273 goto memattr;
1274 }
1275 m->phys_addr = paddr;
1276 m->a.queue = PQ_NONE;
1277 /* Fictitious pages don't use "segind". */
1278 m->flags = PG_FICTITIOUS;
1279 /* Fictitious pages don't use "order" or "pool". */
1280 m->oflags = VPO_UNMANAGED;
1281 m->busy_lock = VPB_CURTHREAD_EXCLUSIVE;
1282 /* Fictitious pages are unevictable. */
1283 m->ref_count = 1;
1284 pmap_page_init(m);
1285memattr:
1286 pmap_page_set_memattr(m, memattr);
1287}
1288
1289/*
1290 * vm_page_putfake:

Callers 3

gicv3_its_attachFunction · 0.85
vm_page_getfakeFunction · 0.85

Calls 2

pmap_page_initFunction · 0.50
pmap_page_set_memattrFunction · 0.50

Tested by

no test coverage detected