arm64: use for_each_of_cpu_node iterator
authorRob Herring <robh@kernel.org>
Mon, 27 Aug 2018 14:43:01 +0000 (09:43 -0500)
committerRob Herring <robh@kernel.org>
Fri, 28 Sep 2018 19:25:58 +0000 (14:25 -0500)
Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
has the side effect of defaulting to iterating using "cpu" node names in
preference to the deprecated (for FDT) device_type == "cpu".

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
arch/arm64/kernel/smp.c

index 25fcd22a4bb2430480e3acb2447a670d65474c8f..96b8f2f51ab22000c4b4463ec2340c7c3ba3fb7b 100644 (file)
@@ -602,7 +602,7 @@ static void __init of_parse_and_init_cpus(void)
 {
        struct device_node *dn;
 
-       for_each_node_by_type(dn, "cpu") {
+       for_each_of_cpu_node(dn) {
                u64 hwid = of_get_cpu_mpidr(dn);
 
                if (hwid == INVALID_HWID)