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

Function pmap_clear_modify

freebsd/mips/mips/pmap.c:3163–3188  ·  view source on GitHub ↗

* Clear the modify bits on the specified physical page. */

Source from the content-addressed store, hash-verified

3161 * Clear the modify bits on the specified physical page.
3162 */
3163void
3164pmap_clear_modify(vm_page_t m)
3165{
3166 pmap_t pmap;
3167 pt_entry_t *pte;
3168 pv_entry_t pv;
3169
3170 KASSERT((m->oflags & VPO_UNMANAGED) == 0,
3171 ("pmap_clear_modify: page %p is not managed", m));
3172 vm_page_assert_busied(m);
3173
3174 if (!pmap_page_is_write_mapped(m))
3175 return;
3176 rw_wlock(&pvh_global_lock);
3177 TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
3178 pmap = PV_PMAP(pv);
3179 PMAP_LOCK(pmap);
3180 pte = pmap_pte(pmap, pv->pv_va);
3181 if (pte_test(pte, PTE_D)) {
3182 pte_clear(pte, PTE_D);
3183 pmap_update_page(pmap, pv->pv_va, *pte);
3184 }
3185 PMAP_UNLOCK(pmap);
3186 }
3187 rw_wunlock(&pvh_global_lock);
3188}
3189
3190/*
3191 * pmap_is_referenced:

Callers 1

vm_page_set_validcleanFunction · 0.50

Calls 2

pmap_update_pageFunction · 0.85
pmap_pteFunction · 0.70

Tested by

no test coverage detected