diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2011-04-10 16:42:05 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-27 00:18:35 -0400 |
commit | e70606eb9beb683ce3991936267deab64ab56d95 (patch) | |
tree | 76f6150ee5dda255c6ae47b7e6eff732973eda71 /arch | |
parent | 69b123684b50040b0926eed1e02795dac8cb9587 (diff) |
powerpc/numa: Look for ibm, associativity-reference-points at the root
If we don't find ibm,associativity-reference-points as a child of
/rtas, look for it at the root of the tree instead. We use this on
Book3E where we have no RTAS but still use the sPAPR conventions
for NUMA.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/mm/numa.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 5ec1dad2a19d..e49b799b59a3 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -311,14 +311,13 @@ EXPORT_SYMBOL_GPL(of_node_to_nid); | |||
311 | static int __init find_min_common_depth(void) | 311 | static int __init find_min_common_depth(void) |
312 | { | 312 | { |
313 | int depth; | 313 | int depth; |
314 | struct device_node *rtas_root; | ||
315 | struct device_node *chosen; | 314 | struct device_node *chosen; |
315 | struct device_node *root; | ||
316 | const char *vec5; | 316 | const char *vec5; |
317 | 317 | ||
318 | rtas_root = of_find_node_by_path("/rtas"); | 318 | root = of_find_node_by_path("/rtas"); |
319 | 319 | if (!root) | |
320 | if (!rtas_root) | 320 | root = of_find_node_by_path("/"); |
321 | return -1; | ||
322 | 321 | ||
323 | /* | 322 | /* |
324 | * This property is a set of 32-bit integers, each representing | 323 | * This property is a set of 32-bit integers, each representing |
@@ -332,7 +331,7 @@ static int __init find_min_common_depth(void) | |||
332 | * NUMA boundary and the following are progressively less significant | 331 | * NUMA boundary and the following are progressively less significant |
333 | * boundaries. There can be more than one level of NUMA. | 332 | * boundaries. There can be more than one level of NUMA. |
334 | */ | 333 | */ |
335 | distance_ref_points = of_get_property(rtas_root, | 334 | distance_ref_points = of_get_property(root, |
336 | "ibm,associativity-reference-points", | 335 | "ibm,associativity-reference-points", |
337 | &distance_ref_points_depth); | 336 | &distance_ref_points_depth); |
338 | 337 | ||
@@ -376,11 +375,11 @@ static int __init find_min_common_depth(void) | |||
376 | distance_ref_points_depth = MAX_DISTANCE_REF_POINTS; | 375 | distance_ref_points_depth = MAX_DISTANCE_REF_POINTS; |
377 | } | 376 | } |
378 | 377 | ||
379 | of_node_put(rtas_root); | 378 | of_node_put(root); |
380 | return depth; | 379 | return depth; |
381 | 380 | ||
382 | err: | 381 | err: |
383 | of_node_put(rtas_root); | 382 | of_node_put(root); |
384 | return -1; | 383 | return -1; |
385 | } | 384 | } |
386 | 385 | ||