powerpc/perf: Fix pmu_count to count only nest imc pmus
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Wed, 22 Nov 2017 05:15:38 +0000 (10:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:06 +0000 (09:53 +0100)
commit86d1d015fe06267b60d496971d01c859aaa8ce08
tree4a5fed36222a53024b0dae0b5e75b545de6f8223
parent394d0c93b9dd2dee2024a9d922a60b3a3aadb538
powerpc/perf: Fix pmu_count to count only nest imc pmus

[ Upstream commit de34787f1096cce38e2590be0013b44418d14546 ]

"pmu_count" in opal_imc_counters_probe() is intended to hold
the number of successful nest imc pmu registerations. But
current code also counts other imc units like core_imc and
thread_imc. Patch add a check to count only nest imc pmus.

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/powernv/opal-imc.c