|
@@ -1827,6 +1827,7 @@ static int power_pmu_event_init(struct perf_event *event)
|
|
|
int n;
|
|
int n;
|
|
|
int err;
|
|
int err;
|
|
|
struct cpu_hw_events *cpuhw;
|
|
struct cpu_hw_events *cpuhw;
|
|
|
|
|
+ u64 bhrb_filter;
|
|
|
|
|
|
|
|
if (!ppmu)
|
|
if (!ppmu)
|
|
|
return -ENOENT;
|
|
return -ENOENT;
|
|
@@ -1932,13 +1933,14 @@ static int power_pmu_event_init(struct perf_event *event)
|
|
|
err = power_check_constraints(cpuhw, events, cflags, n + 1);
|
|
err = power_check_constraints(cpuhw, events, cflags, n + 1);
|
|
|
|
|
|
|
|
if (has_branch_stack(event)) {
|
|
if (has_branch_stack(event)) {
|
|
|
- cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
|
|
|
|
|
|
|
+ bhrb_filter = ppmu->bhrb_filter_map(
|
|
|
event->attr.branch_sample_type);
|
|
event->attr.branch_sample_type);
|
|
|
|
|
|
|
|
- if (cpuhw->bhrb_filter == -1) {
|
|
|
|
|
|
|
+ if (bhrb_filter == -1) {
|
|
|
put_cpu_var(cpu_hw_events);
|
|
put_cpu_var(cpu_hw_events);
|
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
|
}
|
|
}
|
|
|
|
|
+ cpuhw->bhrb_filter = bhrb_filter;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
put_cpu_var(cpu_hw_events);
|
|
put_cpu_var(cpu_hw_events);
|