Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 2009 21:54:51 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188341 - head/sys/i386/xen
Message-ID:  <200902082154.n18LspRB035509@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902082154.n18LspRB035509>