| From | Sent On | Attachments |
|---|---|---|
| 146 earlier messages | ||
| Thomas Gleixner | Jul 9, 2009 11:25 am | |
| Fernando Lopez-Lezcano | Jul 10, 2009 11:02 am | |
| Fernando Lopez-Lezcano | Jul 10, 2009 11:06 am | |
| Thomas Gleixner | Jul 10, 2009 11:29 am | |
| Fernando Lopez-Lezcano | Jul 10, 2009 5:16 pm | |
| Jaswinder Singh Rajput | Jul 14, 2009 2:12 am | |
| Thomas Gleixner | Jul 29, 2009 5:47 pm | |
| Tim Blechmann | Jul 30, 2009 2:56 am | .patch |
| Darren Hart | Jul 30, 2009 4:03 pm | |
| Clark Williams | Jul 31, 2009 7:12 am | |
| Frederic Weisbecker | Jul 31, 2009 4:21 pm | |
| Darren Hart | Jul 31, 2009 5:41 pm | |
| Frederic Weisbecker | Jul 31, 2009 6:19 pm | |
| Thomas Meyer | Aug 1, 2009 2:48 am | |
| john stultz | Aug 4, 2009 6:29 pm | |
| gowrishankar | Aug 4, 2009 11:05 pm | |
| Clark Williams | Aug 5, 2009 6:32 am | |
| Will Schmidt | Aug 5, 2009 12:19 pm | |
| gowrishankar | Aug 5, 2009 11:45 pm | |
| Clark Williams | Aug 6, 2009 7:36 am | |
| Sven-Thorsten Dietrich | Aug 6, 2009 7:46 am | |
| John Kacur | Aug 6, 2009 7:54 am | |
| gowrishankar | Aug 6, 2009 9:39 am | |
| Sripathi Kodi | Aug 6, 2009 9:25 pm | |
| Darren Hart | Aug 7, 2009 7:29 am | |
| Uwe Kleine-König | Aug 7, 2009 1:39 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:42 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:42 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:42 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:42 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:42 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:42 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:53 pm | |
| Uwe Kleine-König | Aug 7, 2009 1:54 pm | |
| Mark Brown | Aug 8, 2009 12:57 am | |
| Uwe Kleine-König | Aug 9, 2009 2:36 am | |
| Uwe Kleine-König | Aug 9, 2009 2:36 am | |
| Uwe Kleine-König | Aug 9, 2009 2:36 am | |
| Russell King - ARM Linux | Aug 9, 2009 2:42 am | |
| David Miller | Aug 9, 2009 9:48 pm | |
| Uwe Kleine-König | Aug 10, 2009 2:40 am | |
| David Miller | Aug 10, 2009 8:00 am | |
| Kevin Hilman | Aug 10, 2009 9:47 am | |
| Russell King - ARM Linux | Aug 10, 2009 10:26 am | |
| Kevin Hilman | Aug 10, 2009 2:03 pm | |
| Russell King - ARM Linux | Aug 10, 2009 3:02 pm | |
| Jan Engelhardt | Aug 11, 2009 3:51 am | |
| Thomas Gleixner | Aug 11, 2009 11:08 am | |
| Will Schmidt | Aug 12, 2009 1:45 pm | |
| Thomas Gleixner | Aug 13, 2009 12:29 am | |
| Will Schmidt | Aug 13, 2009 8:04 am | |
| Kevin Hilman | Aug 13, 2009 8:05 am | |
| Uwe Kleine-König | Aug 13, 2009 2:33 pm | |
| Peter Zijlstra | Aug 14, 2009 7:02 am | |
| Nicolas Pitre | Aug 14, 2009 8:58 am | |
| Uwe Kleine-König | Aug 14, 2009 1:12 pm | |
| Wim Van Sebroeck | Aug 16, 2009 7:08 am | |
| Thomas Gleixner | Aug 16, 2009 1:41 pm | |
| Dale Stimson | Aug 17, 2009 9:07 am | |
| Thomas Gleixner | Aug 18, 2009 1:03 pm | |
| Will Schmidt | Aug 18, 2009 2:04 pm | |
| Thomas Gleixner | Aug 18, 2009 2:13 pm | |
| john stultz | Aug 18, 2009 3:30 pm | |
| john stultz | Aug 18, 2009 3:49 pm | |
| Will Schmidt | Aug 18, 2009 4:12 pm | |
| john stultz | Aug 18, 2009 5:17 pm | .rt |
| Will Schmidt | Aug 19, 2009 10:11 am | |
| Thomas Gleixner | Aug 19, 2009 2:48 pm | |
| john stultz | Aug 19, 2009 7:18 pm | |
| Dinakar Guniguntala | Aug 20, 2009 8:28 am | |
| Thomas Gleixner | Aug 21, 2009 2:26 pm | |
| Mark Knecht | Aug 21, 2009 3:57 pm | |
| Thomas Gleixner | Aug 26, 2009 10:23 am | |
| Kevin Hilman | Aug 27, 2009 4:02 am | |
| Thomas Gleixner | Aug 28, 2009 2:35 pm | |
| Wu Zhangjin | Sep 2, 2009 8:25 am | |
| Jan Engelhardt | Sep 12, 2009 2:44 am | |
| Thomas Gleixner | Sep 15, 2009 2:11 pm | |
| Thomas Gleixner | Sep 15, 2009 3:29 pm | |
| Thomas Gleixner | Sep 18, 2009 3:38 pm | |
| Jaswinder Singh Rajput | Sep 18, 2009 9:34 pm | |
| Steven Rostedt | Sep 19, 2009 6:37 am | |
| Jaswinder Singh Rajput | Sep 19, 2009 8:01 am | |
| Jon Masters | Sep 20, 2009 4:22 pm | |
| Mark Knecht | Sep 20, 2009 4:34 pm | |
| Darren Hart | Sep 22, 2009 11:31 am | |
| Clark Williams | Sep 22, 2009 12:00 pm | |
| Jan Blunck | Sep 23, 2009 8:39 am | |
| Darren Hart | Sep 23, 2009 9:18 am | |
| Thomas Gleixner | Sep 23, 2009 9:24 am | |
| Will Schmidt | Sep 23, 2009 2:33 pm | |
| Jan Blunck | Sep 24, 2009 8:16 am | |
| Thomas Gleixner | Oct 6, 2009 3:15 am | |
| Remy Bohmer | Oct 6, 2009 11:23 am | |
| Thomas Gleixner | Oct 6, 2009 12:22 pm | |
| Thomas Gleixner | Oct 6, 2009 1:07 pm | |
| Remy Bohmer | Oct 7, 2009 12:13 am | |
| Remy Bohmer | Oct 13, 2009 8:46 am | |
| Thomas Gleixner | Oct 13, 2009 10:10 am | |
| Thomas Gleixner | Oct 14, 2009 3:01 am | |
| 48 later messages | ||
| Subject: | Re: [ANNOUNCE] 2.6.31-rc4-rt1 | |
|---|---|---|
| From: | Thomas Gleixner (tg...@linutronix.de) | |
| Date: | Aug 13, 2009 12:29:40 am | |
| List: | org.kernel.vger.linux-rt-users | |
Will,
On Wed, 12 Aug 2009, Will Schmidt wrote:
The .find_legacy_serial_ports function in the backtrace is very very early during boot. I'll do a bit more looking around to see if it's anything obvious,..
I almost expected some wreckage from converting a rwlock to a spinlock. Grr. That code really takes the lock recursive. None of my powerpc systems triggered that code path. :(
So the reason for having a rwlock was not the concurrent access, it was just the lazy^W reuse of the existing functions which lead to recursive locking.
As it's the only code in tree which would need the real rwlock version I fixed up the of code instead of creating all the extra rwlock functions for rt.
Does the patch below fix it ?
Thanks,
tglx
----- commit 925df9b36dc9abe0bab32cbd2ac544d773da71ff Author: Thomas Gleixner <tg...@linutronix.de> Date: Thu Aug 13 09:04:10 2009 +0200
OF: Fixup resursive locking code paths
The conversion of devtree_lock from rwlock to spinlock unearthed recursive locking pathes. Instead of going down the hassle of having an atomic_rwlock implementation fixup the code pathes to avoid the recursive locking.
Signed-off-by: Thomas Gleixner <tg...@linutronix.de>
diff --git a/drivers/of/base.c b/drivers/of/base.c index 26f4a62..3626e37 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -59,16 +59,14 @@ int of_n_size_cells(struct device_node *np) } EXPORT_SYMBOL(of_n_size_cells);
-struct property *of_find_property(const struct device_node *np, - const char *name, - int *lenp) +static struct property *__of_find_property(const struct device_node *np, + const char *name, int *lenp) { struct property *pp;
if (!np) return NULL;
- atomic_spin_lock(&devtree_lock);
for (pp = np->properties; pp != 0; pp = pp->next) {
if (of_prop_cmp(pp->name, name) == 0) {
if (lenp != 0)
@@ -76,6 +74,18 @@ struct property *of_find_property(const struct device_node
*np,
break;
}
}
+
+ return pp;
+}
+
+struct property *of_find_property(const struct device_node *np,
+ const char *name,
+ int *lenp)
+{
+ struct property *pp;
+
+ atomic_spin_lock(&devtree_lock);
+ pp = __of_find_property(np, name, lenp);
atomic_spin_unlock(&devtree_lock);
return pp; @@ -86,8 +96,20 @@ EXPORT_SYMBOL(of_find_property); * Find a property with a given name for a given node * and return the value. */ +static const void *__of_get_property(const struct device_node *np, + const char *name, int *lenp) +{ + struct property *pp = __of_find_property(np, name, lenp); + + return pp ? pp->value : NULL; +} + +/* + * Find a property with a given name for a given node + * and return the value. + */ const void *of_get_property(const struct device_node *np, const char *name, - int *lenp) + int *lenp) { struct property *pp = of_find_property(np, name, lenp);
@@ -98,13 +120,13 @@ EXPORT_SYMBOL(of_get_property); /** Checks if the given "compat" string matches one of the strings in * the device's "compatible" property */ -int of_device_is_compatible(const struct device_node *device, - const char *compat) +static int __of_device_is_compatible(const struct device_node *device, + const char *compat) { const char* cp; - int cplen, l; + int uninitialized_var(cplen), l;
- cp = of_get_property(device, "compatible", &cplen);
+ cp = __of_get_property(device, "compatible", &cplen);
if (cp == NULL)
return 0;
while (cplen > 0) {
@@ -117,6 +139,20 @@ int of_device_is_compatible(const struct device_node
*device,
return 0; } + +/** Checks if the given "compat" string matches one of the strings in + * the device's "compatible" property + */ +int of_device_is_compatible(const struct device_node *device, + const char *compat) +{ + int res; + + atomic_spin_lock(&devtree_lock); + res = __of_device_is_compatible(device, compat); + atomic_spin_unlock(&devtree_lock); + return res; +} EXPORT_SYMBOL(of_device_is_compatible);
/**
@@ -319,7 +355,8 @@ struct device_node *of_find_compatible_node(struct
device_node *from,
if (type
&& !(np->type && (of_node_cmp(np->type, type) == 0)))
continue;
- if (of_device_is_compatible(np, compatible) && of_node_get(np))
+ if (__of_device_is_compatible(np, compatible) &&
+ of_node_get(np))
break;
}
of_node_put(from);
@@ -363,15 +400,9 @@ out:
}
EXPORT_SYMBOL(of_find_node_with_property);
-/**
- * of_match_node - Tell if an device_node has a matching of_match structure
- * @matches: array of of device match structures to search in
- * @node: the of device structure to match against
- *
- * Low level utility function used by device matching.
- */
-const struct of_device_id *of_match_node(const struct of_device_id *matches,
- const struct device_node *node)
+static const struct of_device_id *
+__of_match_node(const struct of_device_id *matches,
+ const struct device_node *node)
{
while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
int match = 1;
@@ -382,14 +413,32 @@ const struct of_device_id *of_match_node(const struct
of_device_id *matches,
match &= node->type
&& !strcmp(matches->type, node->type);
if (matches->compatible[0])
- match &= of_device_is_compatible(node,
- matches->compatible);
+ match &= __of_device_is_compatible(node,
+ matches->compatible);
if (match)
return matches;
matches++;
}
return NULL;
}
+
+/**
+ * of_match_node - Tell if an device_node has a matching of_match structure
+ * @matches: array of of device match structures to search in
+ * @node: the of device structure to match against
+ *
+ * Low level utility function used by device matching.
+ */
+const struct of_device_id *of_match_node(const struct of_device_id *matches,
+ const struct device_node *node)
+{
+ const struct of_device_id *match;
+
+ atomic_spin_lock(&devtree_lock);
+ match = __of_match_node(matches, node);
+ atomic_spin_unlock(&devtree_lock);
+ return match;
+}
EXPORT_SYMBOL(of_match_node);
/**
@@ -412,7 +461,7 @@ struct device_node *of_find_matching_node(struct device_node
*from,
atomic_spin_lock(&devtree_lock);
np = from ? from->allnext : allnodes;
for (; np; np = np->allnext) {
- if (of_match_node(matches, np) && of_node_get(np))
+ if (__of_match_node(matches, np) && of_node_get(np))
break;
}
of_node_put(from);
-- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majo...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html






.patch