Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2010 19:49:39 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r206857 - user/jmallett/octeon/sys/mips/mips
Message-ID:  <201004191949.o3JJndQf098404@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Mon Apr 19 19:49:39 2010
New Revision: 206857
URL: http://svn.freebsd.org/changeset/base/206857

Log:
  Finally hit a pmap_kenter() of a still-valid address with a different mapping.
  Would be useful to track that down at some point.

Modified:
  user/jmallett/octeon/sys/mips/mips/pmap.c

Modified: user/jmallett/octeon/sys/mips/mips/pmap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/pmap.c	Mon Apr 19 19:29:33 2010	(r206856)
+++ user/jmallett/octeon/sys/mips/mips/pmap.c	Mon Apr 19 19:49:39 2010	(r206857)
@@ -719,7 +719,7 @@ pmap_extract_and_hold(pmap_t pmap, vm_of
 pmap_kenter(vm_offset_t va, vm_paddr_t pa)
 {
 	pt_entry_t *pte;
-	pt_entry_t npte;
+	pt_entry_t opte, npte;
 
 #ifdef PMAP_DEBUG
 	printf("pmap_kenter:  va: %p -> pa: %p\n", (void *)va, (void *)pa);
@@ -732,9 +732,13 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p
 		npte |= PG_C_UC;
 
 	pte = pmap_pte(kernel_pmap, va);
-	KASSERT(!pte_test(pte, PG_V) || *pte == npte,
-		("pmap_kenter for %p with different valid entry", (void *)va));
+	opte = *pte;
 	*pte = npte;
+
+	if (pte_test(pte, PG_V) && opte != npte) {
+		/* XXX dcache wbinv?  */
+		pmap_update_page(kernel_pmap, va, npte);
+	}
 }
 
 /*



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