aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/perf_event.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 6dc4e793df4c..af53c25da2e7 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -960,6 +960,8 @@ out:
960 cpuc->pcr[0] |= cpuc->event[0]->hw.config_base; 960 cpuc->pcr[0] |= cpuc->event[0]->hw.config_base;
961} 961}
962 962
963static void sparc_pmu_start(struct perf_event *event, int flags);
964
963/* On this PMU each PIC has it's own PCR control register. */ 965/* On this PMU each PIC has it's own PCR control register. */
964static void calculate_multiple_pcrs(struct cpu_hw_events *cpuc) 966static void calculate_multiple_pcrs(struct cpu_hw_events *cpuc)
965{ 967{
@@ -972,20 +974,13 @@ static void calculate_multiple_pcrs(struct cpu_hw_events *cpuc)
972 struct perf_event *cp = cpuc->event[i]; 974 struct perf_event *cp = cpuc->event[i];
973 struct hw_perf_event *hwc = &cp->hw; 975 struct hw_perf_event *hwc = &cp->hw;
974 int idx = hwc->idx; 976 int idx = hwc->idx;
975 u64 enc;
976 977
977 if (cpuc->current_idx[i] != PIC_NO_INDEX) 978 if (cpuc->current_idx[i] != PIC_NO_INDEX)
978 continue; 979 continue;
979 980
980 sparc_perf_event_set_period(cp, hwc, idx);
981 cpuc->current_idx[i] = idx; 981 cpuc->current_idx[i] = idx;
982 982
983 enc = perf_event_get_enc(cpuc->events[i]); 983 sparc_pmu_start(cp, PERF_EF_RELOAD);
984 cpuc->pcr[idx] &= ~mask_for_index(idx);
985 if (hwc->state & PERF_HES_STOPPED)
986 cpuc->pcr[idx] |= nop_for_index(idx);
987 else
988 cpuc->pcr[idx] |= event_encoding(enc, idx);
989 } 984 }
990out: 985out:
991 for (i = 0; i < cpuc->n_events; i++) { 986 for (i = 0; i < cpuc->n_events; i++) {