svn commit: r208405 - head/sys/powerpc/aim

Nathan Whitehorn nwhitehorn at FreeBSD.org
Fri May 21 20:46:03 UTC 2010


Author: nwhitehorn
Date: Fri May 21 20:46:01 2010
New Revision: 208405
URL: http://svn.freebsd.org/changeset/base/208405

Log:
  Now that single-threaded access to firmware is enforced by
  IPI_RENDEZVOUS, the ofw mutex is irrelevant.

Modified:
  head/sys/powerpc/aim/ofw_machdep.c

Modified: head/sys/powerpc/aim/ofw_machdep.c
==============================================================================
--- head/sys/powerpc/aim/ofw_machdep.c	Fri May 21 19:47:52 2010	(r208404)
+++ head/sys/powerpc/aim/ofw_machdep.c	Fri May 21 20:46:01 2010	(r208405)
@@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$");
 static struct mem_region OFmem[OFMEM_REGIONS + 1], OFavail[OFMEM_REGIONS + 3];
 static struct mem_region OFfree[OFMEM_REGIONS + 3];
 
-static struct mtx ofw_mutex;
-
 struct mem_region64 {
         vm_offset_t     mr_start_hi;
         vm_offset_t     mr_start_lo;
@@ -285,8 +283,6 @@ OF_bootstrap()
 {
 	boolean_t status = FALSE;
 
-	mtx_init(&ofw_mutex, "open firmware", NULL, MTX_DEF);
-
 	if (ofwcall != NULL) {
 		if (ofw_real_mode)
 			status = OF_install(OFW_STD_REAL, 0);
@@ -356,12 +352,6 @@ openfirmware_core(void *args)
 	u_int	srsave[16];
 	u_int   i;
 
-	/*
-	 * NOTE: This MUST be called with the OF mutex held. Because the CPU
-	 * holding the lock is not necessarily the CPU running this function,
-	 * we can't put an assert here.
-	 */
-
 	__asm __volatile(	"\t"
 		"sync\n\t"
 		"mfmsr  %0\n\t"
@@ -459,8 +449,6 @@ openfirmware(void *args)
 	if (pmap_bootstrapped && ofw_real_mode)
 		args = (void *)pmap_kextract((vm_offset_t)args);
 
-	mtx_lock(&ofw_mutex);
-
 	#ifdef SMP
 	rv_args.args = args;
 	rv_args.in_progress = 1;
@@ -471,8 +459,6 @@ openfirmware(void *args)
 	result = openfirmware_core(args);
 	#endif
 
-	mtx_unlock(&ofw_mutex);
-
 	return (result);
 }
 


More information about the svn-src-all mailing list