parse_numa_properties() determines whether the coregroup associativity
level is present and sets coregroup_enabled before find_possible_nodes()
is called.

Therefore, there is no need for find_possible_nodes() to determine the
same information again from the length of the associativity domain
property.

Signed-off-by: Srikar Dronamraju <[email protected]>
---
 arch/powerpc/mm/numa.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index e97b624203ea..09f7e7b2b192 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1124,7 +1124,7 @@ static void __init find_possible_nodes(void)
 {
        struct device_node *rtas, *root;
        const __be32 *domains = NULL;
-       int prop_length, max_nodes;
+       int max_nodes;
        u32 i;
 
        if (!numa_enabled)
@@ -1145,13 +1145,10 @@ static void __init find_possible_nodes(void)
         */
        root = of_find_node_by_path("/");
        if (!of_get_property(root, "ibm,migratable-partition", NULL))
-               domains = of_get_property(rtas,
-                                         "ibm,current-associativity-domains",
-                                         &prop_length);
+               domains = of_get_property(rtas, 
"ibm,current-associativity-domains", NULL);
        of_node_put(root);
        if (!domains) {
-               domains = of_get_property(rtas, "ibm,max-associativity-domains",
-                                       &prop_length);
+               domains = of_get_property(rtas, 
"ibm,max-associativity-domains", NULL);
                if (!domains)
                        goto out;
        }
@@ -1164,10 +1161,6 @@ static void __init find_possible_nodes(void)
                        node_set(i, node_possible_map);
        }
 
-       prop_length /= sizeof(int);
-       if (prop_length > primary_domain_index + 2)
-               coregroup_enabled = 1;
-
 out:
        of_node_put(rtas);
 }
-- 
2.47.1


Reply via email to