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

Function pt2_wirecount_inc

freebsd/arm/arm/pmap-v6.c:2386–2404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2384}
2385
2386static __inline void
2387pt2_wirecount_inc(vm_page_t m, uint32_t pte1_idx)
2388{
2389
2390 /*
2391 * Note: A just modificated pte2 (i.e. already allocated)
2392 * is acquiring one extra reference which must be
2393 * explicitly cleared. It influences the KASSERTs herein.
2394 * All L2 page tables in a page always belong to the same
2395 * pmap, so we allow only one extra reference for the page.
2396 */
2397 KASSERT(m->md.pt2_wirecount[pte1_idx & PT2PG_MASK] < (NPTE2_IN_PT2 + 1),
2398 ("%s: PT2 is overflowing ...", __func__));
2399 KASSERT(m->ref_count <= (NPTE2_IN_PG + 1),
2400 ("%s: PT2PG is overflowing ...", __func__));
2401
2402 m->ref_count++;
2403 m->md.pt2_wirecount[pte1_idx & PT2PG_MASK]++;
2404}
2405
2406static __inline void
2407pt2_wirecount_dec(vm_page_t m, uint32_t pte1_idx)

Callers 3

_pmap_allocpte2Function · 0.85
pmap_allocpte2Function · 0.85
pmap_enter_quick_lockedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected