aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-02-06 15:30:56 -0500
committerRob Herring <rob.herring@calxeda.com>2013-02-08 18:02:40 -0500
commitd6d3c4e656513dcea61ce900f0ecb9ca820ee7cd (patch)
tree9d5602c46a048aa23be0f5f3fffcf126ace3f651 /arch/sparc/kernel
parenteb7ccb8184ab36b61fb596bd8d573e22e04d6266 (diff)
OF: convert devtree lock from rw_lock to raw spinlock
With the locking cleanup in place (from "OF: Fixup resursive locking code paths"), we can now do the conversion from the rw_lock to a raw spinlock as required for preempt-rt. The previous cleanup and this conversion were originally separate since they predated when mainline got raw spinlock (in commit c2f21ce2e31286a "locking: Implement new raw_spinlock"). So, at that point in time, the cleanup was considered plausible for mainline, but not this conversion. In any case, we've kept them separate as it makes for easier review and better bisection. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [PG: taken from preempt-rt, update subject & add a commit log] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/prom_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c
index 1303021748c8..9f20566b0773 100644
--- a/arch/sparc/kernel/prom_common.c
+++ b/arch/sparc/kernel/prom_common.c
@@ -64,7 +64,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
64 err = -ENODEV; 64 err = -ENODEV;
65 65
66 mutex_lock(&of_set_property_mutex); 66 mutex_lock(&of_set_property_mutex);
67 write_lock(&devtree_lock); 67 raw_spin_lock(&devtree_lock);
68 prevp = &dp->properties; 68 prevp = &dp->properties;
69 while (*prevp) { 69 while (*prevp) {
70 struct property *prop = *prevp; 70 struct property *prop = *prevp;
@@ -91,7 +91,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
91 } 91 }
92 prevp = &(*prevp)->next; 92 prevp = &(*prevp)->next;
93 } 93 }
94 write_unlock(&devtree_lock); 94 raw_spin_unlock(&devtree_lock);
95 mutex_unlock(&of_set_property_mutex); 95 mutex_unlock(&of_set_property_mutex);
96 96
97 /* XXX Upate procfs if necessary... */ 97 /* XXX Upate procfs if necessary... */