diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-12 15:33:56 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-12 15:33:56 +0100 |
commit | 3423cab3e05fe41d42d8905bb2b01d601a03626f (patch) | |
tree | 0791de698fd1c8e69d9ec7e3171ca788b1ef56d6 /arch/arm64/kernel | |
parent | arm64: cputype: Add MIDR values for Cavium ThunderX2 CPUs (diff) | |
parent | perf: ARM DynamIQ Shared Unit PMU support (diff) | |
download | linux-3423cab3e05fe41d42d8905bb2b01d601a03626f.tar.xz linux-3423cab3e05fe41d42d8905bb2b01d601a03626f.zip |
Merge branch 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux
Support for the Cluster PMU part of the ARM DynamIQ Shared Unit (DSU).
* 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux:
perf: ARM DynamIQ Shared Unit PMU support
dt-bindings: Document devicetree binding for ARM DSU PMU
arm_pmu: Use of_cpu_node_to_id helper
arm64: Use of_cpu_node_to_id helper for CPU topology parsing
irqchip: gic-v3: Use of_cpu_node_to_id helper
coresight: of: Use of_cpu_node_to_id helper
of: Add helper for mapping device node to logical CPU number
perf: Export perf_event_update_userpage
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/topology.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 8d48b233e6ce..21868530018e 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -37,18 +37,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) { - 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); + cpu = of_cpu_node_to_id(cpu_node); + if (cpu >= 0) + topology_parse_cpu_capacity(cpu_node, cpu); + else + pr_crit("Unable to find CPU node for %pOF\n", cpu_node); of_node_put(cpu_node); - return -1; + return cpu; } static int __init parse_core(struct device_node *core, int cluster_id, |