atom feed294 messages in org.kernel.vger.linux-rt-usersRe: [ANNOUNCE] 2.6.31-rc4-rt1
FromSent OnAttachments
146 earlier messages
Thomas GleixnerJul 9, 2009 11:25 am 
Fernando Lopez-LezcanoJul 10, 2009 11:02 am 
Fernando Lopez-LezcanoJul 10, 2009 11:06 am 
Thomas GleixnerJul 10, 2009 11:29 am 
Fernando Lopez-LezcanoJul 10, 2009 5:16 pm 
Jaswinder Singh RajputJul 14, 2009 2:12 am 
Thomas GleixnerJul 29, 2009 5:47 pm 
Tim BlechmannJul 30, 2009 2:56 am.patch
Darren HartJul 30, 2009 4:03 pm 
Clark WilliamsJul 31, 2009 7:12 am 
Frederic WeisbeckerJul 31, 2009 4:21 pm 
Darren HartJul 31, 2009 5:41 pm 
Frederic WeisbeckerJul 31, 2009 6:19 pm 
Thomas MeyerAug 1, 2009 2:48 am 
john stultzAug 4, 2009 6:29 pm 
gowrishankarAug 4, 2009 11:05 pm 
Clark WilliamsAug 5, 2009 6:32 am 
Will SchmidtAug 5, 2009 12:19 pm 
gowrishankarAug 5, 2009 11:45 pm 
Clark WilliamsAug 6, 2009 7:36 am 
Sven-Thorsten DietrichAug 6, 2009 7:46 am 
John KacurAug 6, 2009 7:54 am 
gowrishankarAug 6, 2009 9:39 am 
Sripathi KodiAug 6, 2009 9:25 pm 
Darren HartAug 7, 2009 7:29 am 
Uwe Kleine-KönigAug 7, 2009 1:39 pm 
Uwe Kleine-KönigAug 7, 2009 1:42 pm 
Uwe Kleine-KönigAug 7, 2009 1:42 pm 
Uwe Kleine-KönigAug 7, 2009 1:42 pm 
Uwe Kleine-KönigAug 7, 2009 1:42 pm 
Uwe Kleine-KönigAug 7, 2009 1:42 pm 
Uwe Kleine-KönigAug 7, 2009 1:42 pm 
Uwe Kleine-KönigAug 7, 2009 1:53 pm 
Uwe Kleine-KönigAug 7, 2009 1:54 pm 
Mark BrownAug 8, 2009 12:57 am 
Uwe Kleine-KönigAug 9, 2009 2:36 am 
Uwe Kleine-KönigAug 9, 2009 2:36 am 
Uwe Kleine-KönigAug 9, 2009 2:36 am 
Russell King - ARM LinuxAug 9, 2009 2:42 am 
David MillerAug 9, 2009 9:48 pm 
Uwe Kleine-KönigAug 10, 2009 2:40 am 
David MillerAug 10, 2009 8:00 am 
Kevin HilmanAug 10, 2009 9:47 am 
Russell King - ARM LinuxAug 10, 2009 10:26 am 
Kevin HilmanAug 10, 2009 2:03 pm 
Russell King - ARM LinuxAug 10, 2009 3:02 pm 
Jan EngelhardtAug 11, 2009 3:51 am 
Thomas GleixnerAug 11, 2009 11:08 am 
Will SchmidtAug 12, 2009 1:45 pm 
Thomas GleixnerAug 13, 2009 12:29 am 
Will SchmidtAug 13, 2009 8:04 am 
Kevin HilmanAug 13, 2009 8:05 am 
Uwe Kleine-KönigAug 13, 2009 2:33 pm 
Peter ZijlstraAug 14, 2009 7:02 am 
Nicolas PitreAug 14, 2009 8:58 am 
Uwe Kleine-KönigAug 14, 2009 1:12 pm 
Wim Van SebroeckAug 16, 2009 7:08 am 
Thomas GleixnerAug 16, 2009 1:41 pm 
Dale StimsonAug 17, 2009 9:07 am 
Thomas GleixnerAug 18, 2009 1:03 pm 
Will SchmidtAug 18, 2009 2:04 pm 
Thomas GleixnerAug 18, 2009 2:13 pm 
john stultzAug 18, 2009 3:30 pm 
john stultzAug 18, 2009 3:49 pm 
Will SchmidtAug 18, 2009 4:12 pm 
john stultzAug 18, 2009 5:17 pm.rt
Will SchmidtAug 19, 2009 10:11 am 
Thomas GleixnerAug 19, 2009 2:48 pm 
john stultzAug 19, 2009 7:18 pm 
Dinakar GuniguntalaAug 20, 2009 8:28 am 
Thomas GleixnerAug 21, 2009 2:26 pm 
Mark KnechtAug 21, 2009 3:57 pm 
Thomas GleixnerAug 26, 2009 10:23 am 
Kevin HilmanAug 27, 2009 4:02 am 
Thomas GleixnerAug 28, 2009 2:35 pm 
Wu ZhangjinSep 2, 2009 8:25 am 
Jan EngelhardtSep 12, 2009 2:44 am 
Thomas GleixnerSep 15, 2009 2:11 pm 
Thomas GleixnerSep 15, 2009 3:29 pm 
Thomas GleixnerSep 18, 2009 3:38 pm 
Jaswinder Singh RajputSep 18, 2009 9:34 pm 
Steven RostedtSep 19, 2009 6:37 am 
Jaswinder Singh RajputSep 19, 2009 8:01 am 
Jon MastersSep 20, 2009 4:22 pm 
Mark KnechtSep 20, 2009 4:34 pm 
Darren HartSep 22, 2009 11:31 am 
Clark WilliamsSep 22, 2009 12:00 pm 
Jan BlunckSep 23, 2009 8:39 am 
Darren HartSep 23, 2009 9:18 am 
Thomas GleixnerSep 23, 2009 9:24 am 
Will SchmidtSep 23, 2009 2:33 pm 
Jan BlunckSep 24, 2009 8:16 am 
Thomas GleixnerOct 6, 2009 3:15 am 
Remy BohmerOct 6, 2009 11:23 am 
Thomas GleixnerOct 6, 2009 12:22 pm 
Thomas GleixnerOct 6, 2009 1:07 pm 
Remy BohmerOct 7, 2009 12:13 am 
Remy BohmerOct 13, 2009 8:46 am 
Thomas GleixnerOct 13, 2009 10:10 am 
Thomas GleixnerOct 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);