[PATCH 3/5] powerpc/perf: Replace last usage of get_cpu_var with this_cpu_ptr
Anshuman Khandual
khandual at linux.vnet.ibm.com
Tue Jun 30 18:20:29 AEST 2015
The commit 69111bac42f5ce ("powerpc: Replace __get_cpu_var uses")
replaced all usage of get_cpu_var with this_cpu_ptr inside core
perf event handling on powerpc. But it skipped one of them which
is being replaced with this patch.
Reported-by: Daniel Axtens <dja at axtens.net>
Signed-off-by: Anshuman Khandual <khandual at linux.vnet.ibm.com>
---
arch/powerpc/perf/core-book3s.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index f9ecd93..57f2c78 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -1840,20 +1840,17 @@ static int power_pmu_event_init(struct perf_event *event)
if (check_excludes(ctrs, cflags, n, 1))
return -EINVAL;
- cpuhw = &get_cpu_var(cpu_hw_events);
+ cpuhw = this_cpu_ptr(&cpu_hw_events);
err = power_check_constraints(cpuhw, events, cflags, n + 1);
if (has_branch_stack(event)) {
cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);
- if (cpuhw->bhrb_filter == -1) {
- put_cpu_var(cpu_hw_events);
+ if (cpuhw->bhrb_filter == -1)
return -EOPNOTSUPP;
- }
}
- put_cpu_var(cpu_hw_events);
if (err)
return -EINVAL;
--
2.1.0
More information about the Linuxppc-dev
mailing list