| 2384 | } |
| 2385 | |
| 2386 | static __inline void |
| 2387 | pt2_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 | |
| 2406 | static __inline void |
| 2407 | pt2_wirecount_dec(vm_page_t m, uint32_t pte1_idx) |
no outgoing calls
no test coverage detected