diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 6413d9c0313b..d05651584d43 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -602,13 +602,13 @@ hw_perf_counter_init(struct perf_counter *counter) | |||
602 | return NULL; | 602 | return NULL; |
603 | if ((s64)counter->hw_event.irq_period < 0) | 603 | if ((s64)counter->hw_event.irq_period < 0) |
604 | return NULL; | 604 | return NULL; |
605 | if (!counter->hw_event.raw_type) { | 605 | if (!perf_event_raw(&counter->hw_event)) { |
606 | ev = counter->hw_event.event_id; | 606 | ev = perf_event_id(&counter->hw_event); |
607 | if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) | 607 | if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) |
608 | return NULL; | 608 | return NULL; |
609 | ev = ppmu->generic_events[ev]; | 609 | ev = ppmu->generic_events[ev]; |
610 | } else { | 610 | } else { |
611 | ev = counter->hw_event.raw_event_id; | 611 | ev = perf_event_config(&counter->hw_event); |
612 | } | 612 | } |
613 | counter->hw.config_base = ev; | 613 | counter->hw.config_base = ev; |
614 | counter->hw.idx = 0; | 614 | counter->hw.idx = 0; |
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 902282d68b0c..3f95b0cdc550 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -217,15 +217,15 @@ static int __hw_perf_counter_init(struct perf_counter *counter) | |||
217 | /* | 217 | /* |
218 | * Raw event type provide the config in the event structure | 218 | * Raw event type provide the config in the event structure |
219 | */ | 219 | */ |
220 | if (hw_event->raw_type) { | 220 | if (perf_event_raw(hw_event)) { |
221 | hwc->config |= pmc_ops->raw_event(hw_event->raw_event_id); | 221 | hwc->config |= pmc_ops->raw_event(perf_event_config(hw_event)); |
222 | } else { | 222 | } else { |
223 | if (hw_event->event_id >= pmc_ops->max_events) | 223 | if (perf_event_id(hw_event) >= pmc_ops->max_events) |
224 | return -EINVAL; | 224 | return -EINVAL; |
225 | /* | 225 | /* |
226 | * The generic map: | 226 | * The generic map: |
227 | */ | 227 | */ |
228 | hwc->config |= pmc_ops->event_map(hw_event->event_id); | 228 | hwc->config |= pmc_ops->event_map(perf_event_id(hw_event)); |
229 | } | 229 | } |
230 | counter->wakeup_pending = 0; | 230 | counter->wakeup_pending = 0; |
231 | 231 | ||