aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r--arch/sparc/kernel/perf_event.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index fa5936e1c3b9..198fb4e79ba2 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -986,6 +986,17 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self,
986 data.addr = 0; 986 data.addr = 0;
987 987
988 cpuc = &__get_cpu_var(cpu_hw_events); 988 cpuc = &__get_cpu_var(cpu_hw_events);
989
990 /* If the PMU has the TOE IRQ enable bits, we need to do a
991 * dummy write to the %pcr to clear the overflow bits and thus
992 * the interrupt.
993 *
994 * Do this before we peek at the counters to determine
995 * overflow so we don't lose any events.
996 */
997 if (sparc_pmu->irq_bit)
998 pcr_ops->write(cpuc->pcr);
999
989 for (idx = 0; idx < MAX_HWEVENTS; idx++) { 1000 for (idx = 0; idx < MAX_HWEVENTS; idx++) {
990 struct perf_event *event = cpuc->events[idx]; 1001 struct perf_event *event = cpuc->events[idx];
991 struct hw_perf_event *hwc; 1002 struct hw_perf_event *hwc;