PERFORCE change 39947 for review

Juli Mallett jmallett at FreeBSD.org
Sat Oct 18 19:13:32 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=39947

Change 39947 by jmallett at jmallett_dalek on 2003/10/18 19:12:50

	Remove managed stuff, artifact from alpha pmap.

Affected files ...

.. //depot/projects/mips/sys/mips/include/pte.h#9 edit
.. //depot/projects/mips/sys/mips/mips/pmap.c#17 edit
.. //depot/projects/mips/sys/mips/mips/tlb.c#2 edit

Differences ...

==== //depot/projects/mips/sys/mips/include/pte.h#9 (text+ko) ====

@@ -108,11 +108,9 @@
  * 	RO:	Read only.  Never set PG_D on this page, and don't
  * 		listen to requests to write to it.
  * 	W:	Wired.
- * 	M:	Managed.
  */
 #define	PG_RO	(0x01 << MIPS_TLB_SWSHIFT)
 #define	PG_W	(0x02 << MIPS_TLB_SWSHIFT)
-#define	PG_M	(0x04 << MIPS_TLB_SWSHIFT)
 
 /*
  * Amalgamations of flags in software:
@@ -127,7 +125,6 @@
 #define	pte_set(pte,bit)	((*(pte)) |= (bit))
 #define	pte_test(pte,bit)	(((*(pte)) & (bit)) == (bit))
 
-#define	pte_managed(pte)	(pte_test((pte), PG_M))
 #define	pte_valid(pte)		(pte_test((pte), PG_V))
 #define	pte_ro(pte)		(pte_test((pte), PG_RO))
 #define	pte_dirty(pte)		(pte_test((pte), PG_D))

==== //depot/projects/mips/sys/mips/mips/pmap.c#17 (text+ko) ====

@@ -141,7 +141,6 @@
  */
 #define	pmap_pte_ro(pte)	((*(pte) & PG_RO) != 0)
 #define pmap_pte_w(pte)		((*(pte) & PG_W) != 0)
-#define pmap_pte_managed(pte)	((*(pte) & PG_M) != 0)
 #define pmap_pte_v(pte)		((*(pte) & PG_V) != 0)
 #define pmap_pte_pa(pte)	MIPS_PTE_TO_PA(*(pte))
 #define pmap_pte_prot(pte)	(*(pte) & PG_PROT)
@@ -1135,18 +1134,14 @@
 		pmap->pm_stats.wired_count -= 1;
 
 	pmap->pm_stats.resident_count -= 1;
-	if (pmap_pte_managed(&oldpte)) {
-		m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte));
-		if ((oldpte & PG_RO) == 0) {
-			if (pmap_track_modified(va))
-				vm_page_dirty(m);
-		}
-		if ((oldpte & PG_D) == 0)
-			vm_page_flag_set(m, PG_REFERENCED);
-		return pmap_remove_entry(pmap, m, va);
-	} else {
-		/* return pmap_unuse_pt(pmap, va, NULL); */
+	m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte));
+	if ((oldpte & PG_RO) == 0) {
+		if (pmap_track_modified(va))
+			vm_page_dirty(m);
 	}
+	if ((oldpte & PG_D) == 0)
+		vm_page_flag_set(m, PG_REFERENCED);
+	return pmap_remove_entry(pmap, m, va);
 
 	return 0;
 }
@@ -1358,9 +1353,9 @@
 		}
 		if (pte_dirty(pte)) {
 			/*
-			 * If it's not read-only, is managed, and modified, dirty it.
+			 * If it's not read-only and is modified, dirty it.
 			 */
-			if (pte_managed(pte) && !pte_ro(pte) && pte_dirty(pte)) {
+			if (!pte_ro(pte) && pte_dirty(pte)) {
 				KASSERT(pmap_track_modified(va), ("pmap modified"));
 				vm_page_dirty(PHYS_TO_VM_PAGE(opa));
 			}
@@ -1823,10 +1818,6 @@
 #endif
 	pa = pmap_pte_pa(pte);
 
-	KASSERT(pmap_pte_managed(pte),
-	    ("pmap_emulate_reference(%p, 0x%lx, %d, %d): pa 0x%lx not managed",
-	    curthread, v, user, write, pa));
-
 	/*
 	 * Twiddle the appropriate bits to reflect the reference
 	 * and/or modification..
@@ -1894,8 +1885,6 @@
 		vm_offset_t pa;
 
 		val = MINCORE_INCORE;
-		if (!pmap_pte_managed(pte))
-			return val;
 
 		pa = pmap_pte_pa(pte);
 

==== //depot/projects/mips/sys/mips/mips/tlb.c#2 (text+ko) ====

@@ -178,12 +178,6 @@
 	/*
 	 * Do we really want to dirty this page?
 	 */
-#if 0 /* XXX ? */
-	if (!pte_managed(pte))
-		panic("tlb modified unmanaged page");
-#endif
-	if (!pte_valid(pte))
-		panic("tlb modified invalid page");
 	if (pte_ro(pte))
 		panic("write to ro page");
 	if (pte_dirty(pte))


More information about the p4-projects mailing list