diff options
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index fcf1788f9626..086127ba580f 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -193,11 +193,12 @@ static u64 __read_mostly hw_cache_event_ids | |||
193 | * Returns the delta events processed. | 193 | * Returns the delta events processed. |
194 | */ | 194 | */ |
195 | static u64 | 195 | static u64 |
196 | x86_perf_event_update(struct perf_event *event, | 196 | x86_perf_event_update(struct perf_event *event) |
197 | struct hw_perf_event *hwc, int idx) | ||
198 | { | 197 | { |
198 | struct hw_perf_event *hwc = &event->hw; | ||
199 | int shift = 64 - x86_pmu.event_bits; | 199 | int shift = 64 - x86_pmu.event_bits; |
200 | u64 prev_raw_count, new_raw_count; | 200 | u64 prev_raw_count, new_raw_count; |
201 | int idx = hwc->idx; | ||
201 | s64 delta; | 202 | s64 delta; |
202 | 203 | ||
203 | if (idx == X86_PMC_IDX_FIXED_BTS) | 204 | if (idx == X86_PMC_IDX_FIXED_BTS) |
@@ -1064,7 +1065,7 @@ static void x86_pmu_stop(struct perf_event *event) | |||
1064 | * Drain the remaining delta count out of a event | 1065 | * Drain the remaining delta count out of a event |
1065 | * that we are disabling: | 1066 | * that we are disabling: |
1066 | */ | 1067 | */ |
1067 | x86_perf_event_update(event, hwc, idx); | 1068 | x86_perf_event_update(event); |
1068 | 1069 | ||
1069 | cpuc->events[idx] = NULL; | 1070 | cpuc->events[idx] = NULL; |
1070 | } | 1071 | } |
@@ -1112,7 +1113,7 @@ static int x86_pmu_handle_irq(struct pt_regs *regs) | |||
1112 | event = cpuc->events[idx]; | 1113 | event = cpuc->events[idx]; |
1113 | hwc = &event->hw; | 1114 | hwc = &event->hw; |
1114 | 1115 | ||
1115 | val = x86_perf_event_update(event, hwc, idx); | 1116 | val = x86_perf_event_update(event); |
1116 | if (val & (1ULL << (x86_pmu.event_bits - 1))) | 1117 | if (val & (1ULL << (x86_pmu.event_bits - 1))) |
1117 | continue; | 1118 | continue; |
1118 | 1119 | ||
@@ -1458,7 +1459,7 @@ void __init init_hw_perf_events(void) | |||
1458 | 1459 | ||
1459 | static inline void x86_pmu_read(struct perf_event *event) | 1460 | static inline void x86_pmu_read(struct perf_event *event) |
1460 | { | 1461 | { |
1461 | x86_perf_event_update(event, &event->hw, event->hw.idx); | 1462 | x86_perf_event_update(event); |
1462 | } | 1463 | } |
1463 | 1464 | ||
1464 | static const struct pmu pmu = { | 1465 | static const struct pmu pmu = { |