[eros-cvs] cvs commit: eros/src/base/sys/arch/i486/kernel PageFault.cxx

shap@eros.cs.jhu.edu shap@eros.cs.jhu.edu
Sun, 1 Apr 2001 21:37:16 -0400


shap        01/04/01 21:37:16

  Modified:    src/base/sys/arch/i486/kernel PageFault.cxx
  Log:
  This removes various asserts that were overly conservative. Because
  proc_WalkSeg can call Yield(), it is possible for a dangling
  PTE_IN_PROGRESS value to be left in a PTE that was under
  construction. As PTE_IN_PROGRESS is not a valid PTE value, there is no
  harm in such a dangle, and the assert was harmlessly mistaken.

Revision  Changes    Path
1.167     +0 -11     eros/src/base/sys/arch/i486/kernel/PageFault.cxx

Index: PageFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/PageFault.cxx,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- PageFault.cxx	2001/04/01 23:05:55	1.166
+++ PageFault.cxx	2001/04/02 01:37:16	1.167
@@ -588,9 +588,6 @@
   if ( p->fixRegs.MappingTable == KERNPAGEDIR )
     p->fixRegs.MappingTable = PTE_ZAPPED;
 
-  assert ( p->fixRegs.MappingTable == PTE_ZAPPED ||
-	   PTE_IS (*((PTE *) p->fixRegs.MappingTable), PTE_V) );
-
   /* Set up a WalkInfo structure and start building the necessary
    * mapping table, PDE, and PTE entries.
    */
@@ -630,8 +627,6 @@
       uint32_t pdeNdx = (la >> 22) & 0x3ffu;
       PTE& thePDE = pTable[pdeNdx];
 
-      assert ( PTE_IS(thePDE, PTE_V) || thePDE.w_value == PTE_ZAPPED );
-
       if ( PTE_IS(thePDE, PTE_V|PTE_USER) ) {
 
 	/* We could short-circuit the walk in this case by remembering
@@ -712,8 +707,6 @@
   /* No page directory was found, so we need to construct a page
    * directory. */
   
-  assert (p->fixRegs.MappingTable == PTE_ZAPPED);
-
   p->fixRegs.MappingTable = PTE_IN_PROGRESS;
   
   /* Begin the traversal... */
@@ -776,8 +769,6 @@
     uint32_t pdeNdx = (la >> 22) & 0x3ffu;
     PTE& thePDE = pTable[pdeNdx];
 
-    assert ( PTE_IS(thePDE, PTE_V) || (thePDE.w_value == PTE_ZAPPED) );
-
     if (PTE_ISNOT(thePDE, PTE_V))
       thePDE.w_value = PTE_IN_PROGRESS;
 
@@ -852,8 +843,6 @@
   {
     uint32_t pteNdx = (la >> 12) & 0x3ffu;
     PTE& thePTE = pTable[pteNdx];
-
-    assert ( PTE_IS(thePTE, PTE_V) || thePTE.w_value == PTE_ZAPPED );
 
     if (PTE_ISNOT(thePTE, PTE_V))
       thePTE.w_value = PTE_IN_PROGRESS;