Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9823bfc authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Raghavendra Rao Ananta
Browse files

arm64: Use of_cpu_node_to_id helper for CPU topology parsing



Make use of the new generic helper to convert an of_node of a CPU
to the logical CPU id in parsing the topology.

Change-Id: If540bdef68ae2e7bc2e521de21dff8415279fc07
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Git-commit: 52cac1103af3283c7e4386b796da9cc92c3320e0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[rananta@codeaurora.org: Reformatted print statement to avoid info leak]
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent 76154d31
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -38,18 +38,14 @@ static int __init get_cpu_for_node(struct device_node *node)
	if (!cpu_node)
		return -1;

	for_each_possible_cpu(cpu) {
		if (of_get_cpu_node(cpu, NULL) == cpu_node) {
	cpu = of_cpu_node_to_id(cpu_node);
	if (cpu >= 0)
		topology_parse_cpu_capacity(cpu_node, cpu);
			of_node_put(cpu_node);
			return cpu;
		}
	}

	pr_crit("Unable to find CPU node for %pOF\n", cpu_node);
	else
		pr_crit("Unable to find CPU node for %pKOF\n", cpu_node);

	of_node_put(cpu_node);
	return -1;
	return cpu;
}

static int __init parse_core(struct device_node *core, int cluster_id,