aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/perf_event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
index 43b83c35cf54..5c14ffe51258 100644
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -791,8 +791,11 @@ static void power_pmu_disable(struct perf_event *event)
791 cpuhw = &__get_cpu_var(cpu_hw_events); 791 cpuhw = &__get_cpu_var(cpu_hw_events);
792 for (i = 0; i < cpuhw->n_events; ++i) { 792 for (i = 0; i < cpuhw->n_events; ++i) {
793 if (event == cpuhw->event[i]) { 793 if (event == cpuhw->event[i]) {
794 while (++i < cpuhw->n_events) 794 while (++i < cpuhw->n_events) {
795 cpuhw->event[i-1] = cpuhw->event[i]; 795 cpuhw->event[i-1] = cpuhw->event[i];
796 cpuhw->events[i-1] = cpuhw->events[i];
797 cpuhw->flags[i-1] = cpuhw->flags[i];
798 }
796 --cpuhw->n_events; 799 --cpuhw->n_events;
797 ppmu->disable_pmc(event->hw.idx - 1, cpuhw->mmcr); 800 ppmu->disable_pmc(event->hw.idx - 1, cpuhw->mmcr);
798 if (event->hw.idx) { 801 if (event->hw.idx) {