* Just subroutine for pmap_remove_pages() to reasonably satisfy * good coding style, a.k.a. 80 character line width limit hell. */
| 4336 | * good coding style, a.k.a. 80 character line width limit hell. |
| 4337 | */ |
| 4338 | static __inline void |
| 4339 | pmap_remove_pte1_quick(pmap_t pmap, pt1_entry_t pte1, pv_entry_t pv, |
| 4340 | struct spglist *free) |
| 4341 | { |
| 4342 | vm_paddr_t pa; |
| 4343 | vm_page_t m, mt, mpt2pg; |
| 4344 | struct md_page *pvh; |
| 4345 | |
| 4346 | pa = pte1_pa(pte1); |
| 4347 | m = PHYS_TO_VM_PAGE(pa); |
| 4348 | |
| 4349 | KASSERT(m->phys_addr == pa, ("%s: vm_page_t %p addr mismatch %#x %#x", |
| 4350 | __func__, m, m->phys_addr, pa)); |
| 4351 | KASSERT((m->flags & PG_FICTITIOUS) != 0 || |
| 4352 | m < &vm_page_array[vm_page_array_size], |
| 4353 | ("%s: bad pte1 %#x", __func__, pte1)); |
| 4354 | |
| 4355 | if (pte1_is_dirty(pte1)) { |
| 4356 | for (mt = m; mt < &m[PTE1_SIZE / PAGE_SIZE]; mt++) |
| 4357 | vm_page_dirty(mt); |
| 4358 | } |
| 4359 | |
| 4360 | pmap->pm_stats.resident_count -= PTE1_SIZE / PAGE_SIZE; |
| 4361 | pvh = pa_to_pvh(pa); |
| 4362 | TAILQ_REMOVE(&pvh->pv_list, pv, pv_next); |
| 4363 | if (TAILQ_EMPTY(&pvh->pv_list)) { |
| 4364 | for (mt = m; mt < &m[PTE1_SIZE / PAGE_SIZE]; mt++) |
| 4365 | if (TAILQ_EMPTY(&mt->md.pv_list)) |
| 4366 | vm_page_aflag_clear(mt, PGA_WRITEABLE); |
| 4367 | } |
| 4368 | mpt2pg = pmap_pt2_page(pmap, pv->pv_va); |
| 4369 | if (mpt2pg != NULL) |
| 4370 | pmap_unwire_pt2_all(pmap, pv->pv_va, mpt2pg, free); |
| 4371 | } |
| 4372 | |
| 4373 | /* |
| 4374 | * Just subroutine for pmap_remove_pages() to reasonably satisfy |
no test coverage detected