summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-04-30 15:22:52 +0000
committeralc <alc@FreeBSD.org>2010-04-30 15:22:52 +0000
commit5cccf02a9e818719ef70601ab63344bbcdac7286 (patch)
treeff51ba2aca6c8a33fe075b765342f9133a741390 /sys/powerpc
parent306735e614e65ae3de67b0c1c1f74dd76e1583f3 (diff)
downloadFreeBSD-src-5cccf02a9e818719ef70601ab63344bbcdac7286.zip
FreeBSD-src-5cccf02a9e818719ef70601ab63344bbcdac7286.tar.gz
MFamd64/i386 r207205
Clearing a page table entry's accessed bit and setting the page's PG_REFERENCED flag in pmap_protect() can't really be justified, so don't do it. Additionally, two changes that make this pmap behave like the others do: Change pmap_protect() such that it calls vm_page_dirty() only if the page is managed. Change pmap_remove_write() such that it doesn't clear a page table entry's accessed bit.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/booke/pmap.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c
index 0b0fce4..78e9afb 100644
--- a/sys/powerpc/booke/pmap.c
+++ b/sys/powerpc/booke/pmap.c
@@ -1915,16 +1915,11 @@ mmu_booke_protect(mmu_t mmu, pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
tlb_miss_lock();
/* Handle modified pages. */
- if (PTE_ISMODIFIED(pte))
+ if (PTE_ISMODIFIED(pte) && PTE_ISMANAGED(pte))
vm_page_dirty(m);
- /* Referenced pages. */
- if (PTE_ISREFERENCED(pte))
- vm_page_flag_set(m, PG_REFERENCED);
-
tlb0_flush_entry(va);
- pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED |
- PTE_REFERENCED);
+ pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED);
tlb_miss_unlock();
mtx_unlock_spin(&tlbivax_mutex);
@@ -1962,13 +1957,8 @@ mmu_booke_remove_write(mmu_t mmu, vm_page_t m)
if (PTE_ISMODIFIED(pte))
vm_page_dirty(m);
- /* Referenced pages. */
- if (PTE_ISREFERENCED(pte))
- vm_page_flag_set(m, PG_REFERENCED);
-
/* Flush mapping from TLB0. */
- pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED |
- PTE_REFERENCED);
+ pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED);
tlb_miss_unlock();
mtx_unlock_spin(&tlbivax_mutex);
OpenPOWER on IntegriCloud