diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-05-07 03:29:25 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-05-07 03:29:25 +0200 |
commit | 1ed31d6db90d51010545921e59d369d2f92b7ac2 (patch) | |
tree | 358a0b346bc8135cd5e53700eb44308b1a7c8c5b /arch/powerpc/mm/numa.c | |
parent | powerpc/cpumask: Add DEBUG_PER_CPU_MAPS option (diff) | |
parent | Merge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarz... (diff) | |
download | linux-1ed31d6db90d51010545921e59d369d2f92b7ac2.tar.xz linux-1ed31d6db90d51010545921e59d369d2f92b7ac2.zip |
Merge commit 'origin/master' into next
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r-- | arch/powerpc/mm/numa.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index d68491b31e38..aace5e5dfa0a 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -267,10 +267,11 @@ EXPORT_SYMBOL_GPL(of_node_to_nid); */ static int __init find_min_common_depth(void) { - int depth; + int depth, index; const unsigned int *ref_points; struct device_node *rtas_root; unsigned int len; + struct device_node *options; rtas_root = of_find_node_by_path("/rtas"); @@ -283,11 +284,23 @@ static int __init find_min_common_depth(void) * configuration (should be all 0's) and the second is for a normal * NUMA configuration. */ + index = 1; ref_points = of_get_property(rtas_root, "ibm,associativity-reference-points", &len); + /* + * For type 1 affinity information we want the first field + */ + options = of_find_node_by_path("/options"); + if (options) { + const char *str; + str = of_get_property(options, "ibm,associativity-form", NULL); + if (str && !strcmp(str, "1")) + index = 0; + } + if ((len >= 2 * sizeof(unsigned int)) && ref_points) { - depth = ref_points[1]; + depth = ref_points[index]; } else { dbg("NUMA: ibm,associativity-reference-points not found.\n"); depth = -1; |