summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-04-29 15:47:31 +0000
committeralc <alc@FreeBSD.org>2010-04-29 15:47:31 +0000
commitdf2257e061f55c35d76f33f91541c65c33f7a2a7 (patch)
tree3bc3eb69048a61f232f804a52e008180280b53da /sys/sun4v
parentdb164aeb155dac81c7d06bc5e1780b7dadebde0b (diff)
downloadFreeBSD-src-df2257e061f55c35d76f33f91541c65c33f7a2a7.zip
FreeBSD-src-df2257e061f55c35d76f33f91541c65c33f7a2a7.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. Moreover, on ia64, don't set the page's dirty field unless pmap_protect() is removing write access.
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/sun4v/pmap.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c
index 2633b8e..cbd8106 100644
--- a/sys/sun4v/sun4v/pmap.c
+++ b/sys/sun4v/sun4v/pmap.c
@@ -1824,17 +1824,10 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
if (!anychanged && (otte_data & VTD_W))
anychanged = 1;
- if (otte_data & VTD_MANAGED) {
- m = NULL;
-
- if (otte_data & VTD_REF) {
- m = PHYS_TO_VM_PAGE(TTE_GET_PA(otte_data));
- vm_page_flag_set(m, PG_REFERENCED);
- }
- if (otte_data & VTD_W) {
- m = PHYS_TO_VM_PAGE(TTE_GET_PA(otte_data));
- vm_page_dirty(m);
- }
+ if ((otte_data & (VTD_MANAGED | VTD_W)) == (VTD_MANAGED |
+ VTD_W)) {
+ m = PHYS_TO_VM_PAGE(TTE_GET_PA(otte_data));
+ vm_page_dirty(m);
}
}
OpenPOWER on IntegriCloud