Author: kmacy
Date: Sun Feb  8 21:54:51 2009
New Revision: 188341
URL: http://svn.freebsd.org/changeset/base/188341

Log:
  Don't try to directly update page tables

Modified:
  head/sys/i386/xen/pmap.c

Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c    Sun Feb  8 21:50:47 2009        (r188340)
+++ head/sys/i386/xen/pmap.c    Sun Feb  8 21:54:51 2009        (r188341)
@@ -3713,14 +3713,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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to