diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index ea635a84e024..1b8f54faa26d 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2062,12 +2062,13 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp) if ((tpte & ATTR_SW_WIRED) != 0) continue; tpte = pmap_load_clear(pte); - pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & ~ATTR_MASK); if (pmap_pte_dirty(tpte)) vm_page_dirty(m); - if ((tpte & ATTR_AF) != 0) + if ((tpte & ATTR_AF) != 0) { + pmap_invalidate_page(pmap, va); vm_page_aflag_set(m, PGA_REFERENCED); + } CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); m->md.pv_gen++;