Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 2010 04:25:36 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r207305 - head/sys/mips/mips
Message-ID:  <201004280425.o3S4Pae5019693@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Wed Apr 28 04:25:36 2010
New Revision: 207305
URL: http://svn.freebsd.org/changeset/base/207305

Log:
  Adapt i386 r207205 to mips: Clearing PV_TABLE_REF and setting the page's
  PG_REFERENCED flag in pmap_protect() can't really be justified, so don't
  do it.

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Wed Apr 28 00:49:24 2010	(r207304)
+++ head/sys/mips/mips/pmap.c	Wed Apr 28 04:25:36 2010	(r207305)
@@ -1690,16 +1690,10 @@ retry:
 		obits = pbits = *pte;
 		pa = mips_tlbpfn_to_paddr(pbits);
 
-		if (page_is_managed(pa)) {
+		if (page_is_managed(pa) && (pbits & PTE_M) != 0) {
 			m = PHYS_TO_VM_PAGE(pa);
-			if (m->md.pv_flags & PV_TABLE_REF) {
-				vm_page_flag_set(m, PG_REFERENCED);
-				m->md.pv_flags &= ~PV_TABLE_REF;
-			}
-			if (pbits & PTE_M) {
-				vm_page_dirty(m);
-				m->md.pv_flags &= ~PV_TABLE_MOD;
-			}
+			vm_page_dirty(m);
+			m->md.pv_flags &= ~PV_TABLE_MOD;
 		}
 		pbits = (pbits & ~PTE_M) | PTE_RO;
 



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