Prevent the loss of a PG_M bit through an SMP race in pmap_ts_referenced().

This commit is contained in:
alc 2004-06-13 21:59:42 +00:00
parent 0e1c766f8f
commit a73d5d0e50
2 changed files with 2 additions and 2 deletions

View File

@ -2669,7 +2669,7 @@ pmap_ts_referenced(vm_page_t m)
pte = pmap_pte(pv->pv_pmap, pv->pv_va);
if (pte && ((v = pte_load(pte)) & PG_A) != 0) {
pte_store(pte, v & ~PG_A);
atomic_clear_long(pte, PG_A);
pmap_invalidate_page(pv->pv_pmap, pv->pv_va);
rtval++;

View File

@ -2777,7 +2777,7 @@ pmap_ts_referenced(vm_page_t m)
pte = pmap_pte_quick(pv->pv_pmap, pv->pv_va);
if (pte && ((v = pte_load(pte)) & PG_A) != 0) {
pte_store(pte, v & ~PG_A);
atomic_clear_int((u_int *)pte, PG_A);
pmap_invalidate_page(pv->pv_pmap, pv->pv_va);
rtval++;