PERFORCE change 180503 for review

Jakub Wojciech Klama jceel at FreeBSD.org
Mon Jul 5 21:18:33 UTC 2010


http://p4web.freebsd.org/@@180503?ac=10

Change 180503 by jceel at jceel on 2010/07/05 21:18:03

	* Enable INVARIANTS and WITNESS by default
	* Fix locking with INVARIANTS.

Affected files ...

.. //depot/projects/soc2010/jceel_dma/sys/arm/conf/DAVINCI#4 edit
.. //depot/projects/soc2010/jceel_dma/sys/arm/davinci/if_dve.c#2 edit

Differences ...

==== //depot/projects/soc2010/jceel_dma/sys/arm/conf/DAVINCI#4 (text+ko) ====

@@ -24,6 +24,10 @@
 options 	BOOTP_NFSV3
 options 	BOOTP_WIRED_TO=dve0
 
+#options 	KTR
+#options	KTR_COMPILE=(KTR_LOCK|KTR_PROC|KTR_INTR|KTR_CALLOUT|KTR_UMA|KTR_SYSC)
+#options	KTR_ENTRIES=131072
+
 #options 	MD_ROOT
 #options 	MD_ROOT_SIZE=8192
 #makeoptions	MFS_IMAGE=/home/jceel/projects/dm644x/mdroot.bin
@@ -44,11 +48,11 @@
 options 	ALT_BREAK_TO_DEBUGGER
 options 	DDB
 options 	DIAGNOSTIC
-#options 	INVARIANTS		#Enable calls of extra sanity checking
-#options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
+options 	INVARIANTS		#Enable calls of extra sanity checking
+options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
 options 	KDB
-#options 	WITNESS			#Enable checks to detect deadlocks and cycles
-#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
+options 	WITNESS			#Enable checks to detect deadlocks and cycles
+options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
 #options 	WITNESS_KDB
 
 # Pseudo devices

==== //depot/projects/soc2010/jceel_dma/sys/arm/davinci/if_dve.c#2 (text+ko) ====

@@ -359,15 +359,11 @@
 	struct dve_softc *sc = device_get_softc(dev);
 	struct mii_data *mii = device_get_softc(sc->dve_miibus);
 
-	dve_lock(sc);
-
 	if ((mii->mii_media_status & IFM_ACTIVE) &&
 	    (mii->mii_media_status & IFM_AVALID))
 		sc->dve_flags |= DVE_FLAG_LINK;
 	else
 		sc->dve_flags &= ~DVE_FLAG_LINK;
-
-	dve_unlock(sc);
 }
 
 static void
@@ -388,12 +384,10 @@
 	uint32_t machi, maclo;
 	int i;
 
-	dve_lock(sc);
+	dve_lock_assert(sc);
 
-	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-		dve_unlock(sc);
+	if (ifp->if_drv_flags & IFF_DRV_RUNNING)
 		return;
-	}
 
 	dve_write_emac_4(sc, DVE_EMAC_SOFTRESET, 1);
 
@@ -454,8 +448,6 @@
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 
 	callout_reset(&sc->dve_tick, hz, dve_tick, sc);
-
-	dve_unlock(sc);
 }
 
 static void


More information about the p4-projects mailing list