aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/perf_event.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 9be089abb5d1..197c79e9206a 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -752,7 +752,6 @@ out:
752static void sparc_pmu_enable(struct pmu *pmu) 752static void sparc_pmu_enable(struct pmu *pmu)
753{ 753{
754 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 754 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
755 u64 pcr;
756 755
757 if (cpuc->enabled) 756 if (cpuc->enabled)
758 return; 757 return;
@@ -760,11 +759,8 @@ static void sparc_pmu_enable(struct pmu *pmu)
760 cpuc->enabled = 1; 759 cpuc->enabled = 1;
761 barrier(); 760 barrier();
762 761
763 pcr = cpuc->pcr[0]; 762 if (cpuc->n_events) {
764 if (!cpuc->n_events) { 763 u64 pcr = maybe_change_configuration(cpuc, cpuc->pcr[0]);
765 pcr = 0;
766 } else {
767 pcr = maybe_change_configuration(cpuc, pcr);
768 764
769 /* We require that all of the events have the same 765 /* We require that all of the events have the same
770 * configuration, so just fetch the settings from the 766 * configuration, so just fetch the settings from the