Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2008 15:03:18 GMT
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 148849 for review
Message-ID:  <200808301503.m7UF3IXs049735@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148849

Change 148849 by nwhitehorn@nwhitehorn_trantor on 2008/08/30 15:02:20

	Partially fix boot while WITNESS and INVARIANTS are enabled. It will no longer silently hang, but there are still panics from lock-order reversals that will need the standard treatment.

Affected files ...

.. //depot/projects/ppc-g5/sys/powerpc/aim/mmu_oea64.c#2 edit

Differences ...

==== //depot/projects/ppc-g5/sys/powerpc/aim/mmu_oea64.c#2 (text+ko) ====

@@ -902,6 +902,8 @@
 
 		/* Enter the pages */
 		PMAP_LOCK(&ofw_pmap);
+		PMAP_LOCK(kernel_pmap);
+
 		DISABLE_TRANS(msr);
 		for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) {
 			struct	vm_page m;
@@ -915,11 +917,12 @@
 			 * so we need them if we want to keep executing. */
 
 			if (translations[i].om_va + off < SEGMENT_LENGTH) {
-				moea64_kenter(mmup,translations[i].om_va + off,
-					translations[i].om_pa_lo + off);
+				moea64_enter_locked(kernel_pmap, 
+					translations[i].om_va + off, &m, 
+					prot, 1);
 			}
 
-			/* Map the frame buffer into the kernel pmap */
+			/* Map the frame buffer into the kernel pmap instead */
 
 			if ((translations[i].om_va + off >= fbva) && 
 			    (translations[i].om_va + off < fbva + fbsize)) {
@@ -932,6 +935,8 @@
 			ofw_mappings++;
 		}
 		ENABLE_TRANS(msr);
+
+		PMAP_UNLOCK(kernel_pmap);
 		PMAP_UNLOCK(&ofw_pmap);
 	}
 



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