aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid Ahern <david.ahern@oracle.com>2015-03-19 16:05:57 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-19 21:54:49 -0400
commit5b0d4b5514bbcce69b516d0742f2cfc84ebd6db3 (patch)
tree2bb8ddcb4b95ff266e21ca57ba3248d22a943f6c /arch/sparc
parentb314acaccd7e0d55314d96be4a33b5f50d0b3344 (diff)
sparc: perf: Remove redundant perf_pmu_{en|dis}able calls
perf_pmu_disable is called by core perf code before pmu->del and the enable function is called by core perf code afterwards. No need to call again within sparc_pmu_del. Ditto for pmu->add and sparc_pmu_add. Signed-off-by: David Ahern <david.ahern@oracle.com> Acked-by: Bob Picco <bob.picco@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/perf_event.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 46a5e4508752..6dc4e793df4c 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1101,7 +1101,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)
1101 int i; 1101 int i;
1102 1102
1103 local_irq_save(flags); 1103 local_irq_save(flags);
1104 perf_pmu_disable(event->pmu);
1105 1104
1106 for (i = 0; i < cpuc->n_events; i++) { 1105 for (i = 0; i < cpuc->n_events; i++) {
1107 if (event == cpuc->event[i]) { 1106 if (event == cpuc->event[i]) {
@@ -1127,7 +1126,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)
1127 } 1126 }
1128 } 1127 }
1129 1128
1130 perf_pmu_enable(event->pmu);
1131 local_irq_restore(flags); 1129 local_irq_restore(flags);
1132} 1130}
1133 1131
@@ -1361,7 +1359,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags)
1361 unsigned long flags; 1359 unsigned long flags;
1362 1360
1363 local_irq_save(flags); 1361 local_irq_save(flags);
1364 perf_pmu_disable(event->pmu);
1365 1362
1366 n0 = cpuc->n_events; 1363 n0 = cpuc->n_events;
1367 if (n0 >= sparc_pmu->max_hw_events) 1364 if (n0 >= sparc_pmu->max_hw_events)
@@ -1394,7 +1391,6 @@ nocheck:
1394 1391
1395 ret = 0; 1392 ret = 0;
1396out: 1393out:
1397 perf_pmu_enable(event->pmu);
1398 local_irq_restore(flags); 1394 local_irq_restore(flags);
1399 return ret; 1395 return ret;
1400} 1396}