Adapt i386 r207205 to mips: Clearing PV_TABLE_REF and setting the page's

PG_REFERENCED flag in pmap_protect() can't really be justified, so don't
do it.
This commit is contained in:
Alan Cox 2010-04-28 04:25:36 +00:00
parent 3e8b572db4
commit 030d4cda77

View File

@ -1690,16 +1690,10 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
obits = pbits = *pte;
pa = mips_tlbpfn_to_paddr(pbits);
if (page_is_managed(pa)) {
if (page_is_managed(pa) && (pbits & PTE_M) != 0) {
m = PHYS_TO_VM_PAGE(pa);
if (m->md.pv_flags & PV_TABLE_REF) {
vm_page_flag_set(m, PG_REFERENCED);
m->md.pv_flags &= ~PV_TABLE_REF;
}
if (pbits & PTE_M) {
vm_page_dirty(m);
m->md.pv_flags &= ~PV_TABLE_MOD;
}
vm_page_dirty(m);
m->md.pv_flags &= ~PV_TABLE_MOD;
}
pbits = (pbits & ~PTE_M) | PTE_RO;