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>
This commit is contained in:
Родитель
69b123684b
Коммит
e70606eb9b
|
@ -311,14 +311,13 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
|
||||||
static int __init find_min_common_depth(void)
|
static int __init find_min_common_depth(void)
|
||||||
{
|
{
|
||||||
int depth;
|
int depth;
|
||||||
struct device_node *rtas_root;
|
|
||||||
struct device_node *chosen;
|
struct device_node *chosen;
|
||||||
|
struct device_node *root;
|
||||||
const char *vec5;
|
const char *vec5;
|
||||||
|
|
||||||
rtas_root = of_find_node_by_path("/rtas");
|
root = of_find_node_by_path("/rtas");
|
||||||
|
if (!root)
|
||||||
if (!rtas_root)
|
root = of_find_node_by_path("/");
|
||||||
return -1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This property is a set of 32-bit integers, each representing
|
* This property is a set of 32-bit integers, each representing
|
||||||
|
@ -332,7 +331,7 @@ static int __init find_min_common_depth(void)
|
||||||
* NUMA boundary and the following are progressively less significant
|
* NUMA boundary and the following are progressively less significant
|
||||||
* boundaries. There can be more than one level of NUMA.
|
* boundaries. There can be more than one level of NUMA.
|
||||||
*/
|
*/
|
||||||
distance_ref_points = of_get_property(rtas_root,
|
distance_ref_points = of_get_property(root,
|
||||||
"ibm,associativity-reference-points",
|
"ibm,associativity-reference-points",
|
||||||
&distance_ref_points_depth);
|
&distance_ref_points_depth);
|
||||||
|
|
||||||
|
@ -376,11 +375,11 @@ static int __init find_min_common_depth(void)
|
||||||
distance_ref_points_depth = MAX_DISTANCE_REF_POINTS;
|
distance_ref_points_depth = MAX_DISTANCE_REF_POINTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
of_node_put(rtas_root);
|
of_node_put(root);
|
||||||
return depth;
|
return depth;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
of_node_put(rtas_root);
|
of_node_put(root);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче