powerpc/perf: Don't enable if we have zero events
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 28 Jun 2013 08:15:14 +0000 (18:15 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 01:50:03 +0000 (11:50 +1000)
commit4ea355b5368bde0574c12430df53334c4be3bdcf
treea92aee5cfb16a4d48a6845cea84b55df7460fb63
parent0a48843d6c5114cfa4a9540ee4d6af87628cec01
powerpc/perf: Don't enable if we have zero events

In power_pmu_enable() we still enable the PMU even if we have zero
events. This should have no effect but doesn't make much sense. Instead
just return after telling the hypervisor that we are not using the PMCs.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
CC: <stable@vger.kernel.org> [v3.10]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/perf/core-book3s.c