aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r--arch/powerpc/mm/numa.c15
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);
311static int __init find_min_common_depth(void) 311static 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
382err: 381err:
383 of_node_put(rtas_root); 382 of_node_put(root);
384 return -1; 383 return -1;
385} 384}
386 385