svn commit: r205496 - in head/sys: dev/ofw powerpc/ofw

Nathan Whitehorn nwhitehorn at FreeBSD.org
Tue Mar 23 01:09:46 UTC 2010


Author: nwhitehorn
Date: Tue Mar 23 01:09:45 2010
New Revision: 205496
URL: http://svn.freebsd.org/changeset/base/205496

Log:
  Do not declare the various OFW command buffers static. It does not
  appear to be necessary on either sparc64 or powerpc, and is a
  concurrency nightmare.
  
  Reviewed by:	marius

Modified:
  head/sys/dev/ofw/ofw_standard.c
  head/sys/powerpc/ofw/ofw_real.c

Modified: head/sys/dev/ofw/ofw_standard.c
==============================================================================
--- head/sys/dev/ofw/ofw_standard.c	Tue Mar 23 01:07:30 2010	(r205495)
+++ head/sys/dev/ofw/ofw_standard.c	Tue Mar 23 01:09:45 2010	(r205496)
@@ -165,7 +165,7 @@ ofw_std_init(ofw_t ofw, void *openfirm)
 static int
 ofw_std_test(ofw_t ofw, const char *name)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -187,7 +187,7 @@ static int
 ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns,
     unsigned long *returns)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -217,7 +217,7 @@ ofw_std_interpret(ofw_t ofw, const char 
 static phandle_t
 ofw_std_peer(ofw_t ofw, phandle_t node)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -239,7 +239,7 @@ ofw_std_peer(ofw_t ofw, phandle_t node)
 static phandle_t
 ofw_std_child(ofw_t ofw, phandle_t node)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -261,7 +261,7 @@ ofw_std_child(ofw_t ofw, phandle_t node)
 static phandle_t
 ofw_std_parent(ofw_t ofw, phandle_t node)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -283,7 +283,7 @@ ofw_std_parent(ofw_t ofw, phandle_t node
 static phandle_t
 ofw_std_instance_to_package(ofw_t ofw, ihandle_t instance)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -305,7 +305,7 @@ ofw_std_instance_to_package(ofw_t ofw, i
 static ssize_t
 ofw_std_getproplen(ofw_t ofw, phandle_t package, const char *propname)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -330,7 +330,7 @@ static ssize_t
 ofw_std_getprop(ofw_t ofw, phandle_t package, const char *propname, void *buf,
     size_t buflen)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -359,7 +359,7 @@ static int
 ofw_std_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf,
     size_t size)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -387,7 +387,7 @@ static int
 ofw_std_setprop(ofw_t ofw, phandle_t package, const char *propname,
     const void *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -415,7 +415,7 @@ ofw_std_setprop(ofw_t ofw, phandle_t pac
 static ssize_t
 ofw_std_canon(ofw_t ofw, const char *device, char *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -441,7 +441,7 @@ ofw_std_canon(ofw_t ofw, const char *dev
 static phandle_t
 ofw_std_finddevice(ofw_t ofw, const char *device)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -463,7 +463,7 @@ ofw_std_finddevice(ofw_t ofw, const char
 static ssize_t
 ofw_std_instance_to_path(ofw_t ofw, ihandle_t instance, char *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -489,7 +489,7 @@ ofw_std_instance_to_path(ofw_t ofw, ihan
 static ssize_t
 ofw_std_package_to_path(ofw_t ofw, phandle_t package, char *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -516,7 +516,7 @@ static int
 ofw_std_call_method(ofw_t ofw, ihandle_t instance, const char *method,
     int nargs, int nreturns, unsigned long *args_and_returns)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -559,7 +559,7 @@ ofw_std_call_method(ofw_t ofw, ihandle_t
 static ihandle_t
 ofw_std_open(ofw_t ofw, const char *device)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -581,7 +581,7 @@ ofw_std_open(ofw_t ofw, const char *devi
 static void
 ofw_std_close(ofw_t ofw, ihandle_t instance)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -599,7 +599,7 @@ ofw_std_close(ofw_t ofw, ihandle_t insta
 static ssize_t
 ofw_std_read(ofw_t ofw, ihandle_t instance, void *addr, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -626,7 +626,7 @@ ofw_std_read(ofw_t ofw, ihandle_t instan
 static ssize_t
 ofw_std_write(ofw_t ofw, ihandle_t instance, const void *addr, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -652,7 +652,7 @@ ofw_std_write(ofw_t ofw, ihandle_t insta
 static int
 ofw_std_seek(ofw_t ofw, ihandle_t instance, uint64_t pos)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -682,7 +682,7 @@ ofw_std_seek(ofw_t ofw, ihandle_t instan
 static caddr_t
 ofw_std_claim(ofw_t ofw, void *virt, size_t size, u_int align)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -708,7 +708,7 @@ ofw_std_claim(ofw_t ofw, void *virt, siz
 static void
 ofw_std_release(ofw_t ofw, void *virt, size_t size)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -732,7 +732,7 @@ ofw_std_release(ofw_t ofw, void *virt, s
 static void
 ofw_std_enter(ofw_t ofw)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -748,7 +748,7 @@ ofw_std_enter(ofw_t ofw)
 static void
 ofw_std_exit(ofw_t ofw)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;

Modified: head/sys/powerpc/ofw/ofw_real.c
==============================================================================
--- head/sys/powerpc/ofw/ofw_real.c	Tue Mar 23 01:07:30 2010	(r205495)
+++ head/sys/powerpc/ofw/ofw_real.c	Tue Mar 23 01:09:45 2010	(r205496)
@@ -273,7 +273,7 @@ ofw_real_init(ofw_t ofw, void *openfirm)
 static int
 ofw_real_test(ofw_t ofw, const char *name)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -304,7 +304,7 @@ ofw_real_test(ofw_t ofw, const char *nam
 static phandle_t
 ofw_real_peer(ofw_t ofw, phandle_t node)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -326,7 +326,7 @@ ofw_real_peer(ofw_t ofw, phandle_t node)
 static phandle_t
 ofw_real_child(ofw_t ofw, phandle_t node)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -348,7 +348,7 @@ ofw_real_child(ofw_t ofw, phandle_t node
 static phandle_t
 ofw_real_parent(ofw_t ofw, phandle_t node)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -370,7 +370,7 @@ ofw_real_parent(ofw_t ofw, phandle_t nod
 static phandle_t
 ofw_real_instance_to_package(ofw_t ofw, ihandle_t instance)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -392,7 +392,7 @@ ofw_real_instance_to_package(ofw_t ofw, 
 static ssize_t
 ofw_real_getproplen(ofw_t ofw, phandle_t package, const char *propname)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -422,7 +422,7 @@ static ssize_t
 ofw_real_getprop(ofw_t ofw, phandle_t package, const char *propname, void *buf, 
     size_t buflen)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -458,7 +458,7 @@ static int
 ofw_real_nextprop(ofw_t ofw, phandle_t package, const char *previous, 
     char *buf, size_t size)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -493,7 +493,7 @@ static int
 ofw_real_setprop(ofw_t ofw, phandle_t package, const char *propname,
     const void *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -526,7 +526,7 @@ ofw_real_setprop(ofw_t ofw, phandle_t pa
 static ssize_t
 ofw_real_canon(ofw_t ofw, const char *device, char *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -559,7 +559,7 @@ ofw_real_canon(ofw_t ofw, const char *de
 static phandle_t
 ofw_real_finddevice(ofw_t ofw, const char *device)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -586,7 +586,7 @@ ofw_real_finddevice(ofw_t ofw, const cha
 static ssize_t
 ofw_real_instance_to_path(ofw_t ofw, ihandle_t instance, char *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -619,7 +619,7 @@ ofw_real_instance_to_path(ofw_t ofw, iha
 static ssize_t
 ofw_real_package_to_path(ofw_t ofw, phandle_t package, char *buf, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -653,7 +653,7 @@ static int
 ofw_real_call_method(ofw_t ofw, ihandle_t instance, const char *method, 
     int nargs, int nreturns, unsigned long *args_and_returns)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -701,7 +701,7 @@ ofw_real_call_method(ofw_t ofw, ihandle_
 static ihandle_t
 ofw_real_open(ofw_t ofw, const char *device)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -729,7 +729,7 @@ ofw_real_open(ofw_t ofw, const char *dev
 static void
 ofw_real_close(ofw_t ofw, ihandle_t instance)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -747,7 +747,7 @@ ofw_real_close(ofw_t ofw, ihandle_t inst
 static ssize_t
 ofw_real_read(ofw_t ofw, ihandle_t instance, void *addr, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -780,7 +780,7 @@ ofw_real_read(ofw_t ofw, ihandle_t insta
 static ssize_t
 ofw_real_write(ofw_t ofw, ihandle_t instance, const void *addr, size_t len)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -811,7 +811,7 @@ ofw_real_write(ofw_t ofw, ihandle_t inst
 static int
 ofw_real_seek(ofw_t ofw, ihandle_t instance, u_int64_t pos)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -841,7 +841,7 @@ ofw_real_seek(ofw_t ofw, ihandle_t insta
 static caddr_t
 ofw_real_claim(ofw_t ofw, void *virt, size_t size, u_int align)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -867,7 +867,7 @@ ofw_real_claim(ofw_t ofw, void *virt, si
 static void
 ofw_real_release(ofw_t ofw, void *virt, size_t size)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -891,7 +891,7 @@ ofw_real_release(ofw_t ofw, void *virt, 
 static void
 ofw_real_enter(ofw_t ofw)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;
@@ -907,7 +907,7 @@ ofw_real_enter(ofw_t ofw)
 static void
 ofw_real_exit(ofw_t ofw)
 {
-	static struct {
+	struct {
 		cell_t name;
 		cell_t nargs;
 		cell_t nreturns;


More information about the svn-src-head mailing list