aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-05-06 21:29:25 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-05-06 21:29:25 -0400
commit1ed31d6db90d51010545921e59d369d2f92b7ac2 (patch)
tree358a0b346bc8135cd5e53700eb44308b1a7c8c5b /arch/powerpc/mm/numa.c
parentceba1abcb00b0ef0b1efcd715285f6e05523edef (diff)
parent722154e4cacf015161efe60009ae9be23d492296 (diff)
Merge commit 'origin/master' into next
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r--arch/powerpc/mm/numa.c17
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);
267 */ 267 */
268static int __init find_min_common_depth(void) 268static int __init find_min_common_depth(void)
269{ 269{
270 int depth; 270 int depth, index;
271 const unsigned int *ref_points; 271 const unsigned int *ref_points;
272 struct device_node *rtas_root; 272 struct device_node *rtas_root;
273 unsigned int len; 273 unsigned int len;
274 struct device_node *options;
274 275
275 rtas_root = of_find_node_by_path("/rtas"); 276 rtas_root = of_find_node_by_path("/rtas");
276 277
@@ -283,11 +284,23 @@ static int __init find_min_common_depth(void)
283 * configuration (should be all 0's) and the second is for a normal 284 * configuration (should be all 0's) and the second is for a normal
284 * NUMA configuration. 285 * NUMA configuration.
285 */ 286 */
287 index = 1;
286 ref_points = of_get_property(rtas_root, 288 ref_points = of_get_property(rtas_root,
287 "ibm,associativity-reference-points", &len); 289 "ibm,associativity-reference-points", &len);
288 290
291 /*
292 * For type 1 affinity information we want the first field
293 */
294 options = of_find_node_by_path("/options");
295 if (options) {
296 const char *str;
297 str = of_get_property(options, "ibm,associativity-form", NULL);
298 if (str && !strcmp(str, "1"))
299 index = 0;
300 }
301
289 if ((len >= 2 * sizeof(unsigned int)) && ref_points) { 302 if ((len >= 2 * sizeof(unsigned int)) && ref_points) {
290 depth = ref_points[1]; 303 depth = ref_points[index];
291 } else { 304 } else {
292 dbg("NUMA: ibm,associativity-reference-points not found.\n"); 305 dbg("NUMA: ibm,associativity-reference-points not found.\n");
293 depth = -1; 306 depth = -1;