diff options
Diffstat (limited to 'arch/powerpc/kernel/perf_counter.c')
-rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 232b00a36f7..4786ad9a288 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -867,13 +867,13 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter) | |||
867 | 867 | ||
868 | if (!ppmu) | 868 | if (!ppmu) |
869 | return ERR_PTR(-ENXIO); | 869 | return ERR_PTR(-ENXIO); |
870 | if (!perf_event_raw(&counter->attr)) { | 870 | if (counter->attr.type != PERF_TYPE_RAW) { |
871 | ev = perf_event_id(&counter->attr); | 871 | ev = counter->attr.config; |
872 | if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) | 872 | if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) |
873 | return ERR_PTR(-EOPNOTSUPP); | 873 | return ERR_PTR(-EOPNOTSUPP); |
874 | ev = ppmu->generic_events[ev]; | 874 | ev = ppmu->generic_events[ev]; |
875 | } else { | 875 | } else { |
876 | ev = perf_event_config(&counter->attr); | 876 | ev = counter->attr.config; |
877 | } | 877 | } |
878 | counter->hw.config_base = ev; | 878 | counter->hw.config_base = ev; |
879 | counter->hw.idx = 0; | 879 | counter->hw.idx = 0; |