diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2015-06-30 08:56:57 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-07-31 10:01:14 -0400 |
commit | bc1e3c4687df62a1f2ba1b6be11efbeb76145366 (patch) | |
tree | 54d5b9de077f21ae746ca38cc6587bc80df44638 | |
parent | b6c084d7aa8bca21920cbbe13ad58572fa85ece6 (diff) |
ARM: perf: replace arch_find_n_match_cpu_physical_id with of_cpu_device_node_get
arch_find_n_match_cpu_physical_id parses the device tree to get the
device node for a given logical cpu index. However, since ARM PMUs get
probed after the CPU device nodes are stashed while registering the
cpus, we can use of_cpu_device_node_get to avoid another DT parse.
This patch replaces arch_find_n_match_cpu_physical_id with
of_cpu_device_node_get to reuse the stashed value directly instead.
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm/kernel/perf_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 5a8f17bfcc60..1cb40651d783 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/cpumask.h> | 15 | #include <linux/cpumask.h> |
16 | #include <linux/export.h> | 16 | #include <linux/export.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/of.h> | 18 | #include <linux/of_device.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
@@ -824,7 +824,7 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu) | |||
824 | 824 | ||
825 | /* Now look up the logical CPU number */ | 825 | /* Now look up the logical CPU number */ |
826 | for_each_possible_cpu(cpu) | 826 | for_each_possible_cpu(cpu) |
827 | if (arch_find_n_match_cpu_physical_id(dn, cpu, NULL)) | 827 | if (dn == of_cpu_device_node_get(cpu)) |
828 | break; | 828 | break; |
829 | 829 | ||
830 | if (cpu >= nr_cpu_ids) { | 830 | if (cpu >= nr_cpu_ids) { |