Commit 5c02c268 authored by David Ahern's avatar David Ahern Committed by Luis Henriques

sparc: perf: Remove redundant perf_pmu_{en|dis}able calls

commit 5b0d4b55 upstream.

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: default avatarDavid Ahern <david.ahern@oracle.com>
Acked-by: default avatarBob Picco <bob.picco@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 83c740ac
...@@ -1101,7 +1101,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags) ...@@ -1101,7 +1101,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)
int i; int i;
local_irq_save(flags); local_irq_save(flags);
perf_pmu_disable(event->pmu);
for (i = 0; i < cpuc->n_events; i++) { for (i = 0; i < cpuc->n_events; i++) {
if (event == cpuc->event[i]) { if (event == cpuc->event[i]) {
...@@ -1127,7 +1126,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags) ...@@ -1127,7 +1126,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)
} }
} }
perf_pmu_enable(event->pmu);
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -1361,7 +1359,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags) ...@@ -1361,7 +1359,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags)
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
perf_pmu_disable(event->pmu);
n0 = cpuc->n_events; n0 = cpuc->n_events;
if (n0 >= sparc_pmu->max_hw_events) if (n0 >= sparc_pmu->max_hw_events)
...@@ -1394,7 +1391,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags) ...@@ -1394,7 +1391,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags)
ret = 0; ret = 0;
out: out:
perf_pmu_enable(event->pmu);
local_irq_restore(flags); local_irq_restore(flags);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment