svn commit: r188349 - projects/releng_7_xen/sys/i386/xen
Kip Macy
kmacy at FreeBSD.org
Sun Feb 8 14:31:32 PST 2009
Author: kmacy
Date: Sun Feb 8 22:31:31 2009
New Revision: 188349
URL: http://svn.freebsd.org/changeset/base/188349
Log:
don't touch page tables directly
Modified:
projects/releng_7_xen/sys/i386/xen/pmap.c
Modified: projects/releng_7_xen/sys/i386/xen/pmap.c
==============================================================================
--- projects/releng_7_xen/sys/i386/xen/pmap.c Sun Feb 8 22:17:24 2009 (r188348)
+++ projects/releng_7_xen/sys/i386/xen/pmap.c Sun Feb 8 22:31:31 2009 (r188349)
@@ -3664,14 +3664,17 @@ pmap_remove_write(vm_page_t m)
retry:
oldpte = *pte;
if ((oldpte & PG_RW) != 0) {
+ vm_paddr_t newpte = oldpte & ~(PG_RW | PG_M);
+
/*
* Regardless of whether a pte is 32 or 64 bits
* in size, PG_RW and PG_M are among the least
* significant 32 bits.
*/
- if (!atomic_cmpset_int((u_int *)pte, oldpte,
- oldpte & ~(PG_RW | PG_M)))
+ PT_SET_VA_MA(pte, newpte, TRUE);
+ if (*pte != newpte)
goto retry;
+
if ((oldpte & PG_M) != 0)
vm_page_dirty(m);
pmap_invalidate_page(pmap, pv->pv_va);
More information about the svn-src-projects
mailing list