powerpc/perf: Unregister thread-imc if core-imc not supported
authorAnju T Sudhakar <anju@linux.vnet.ibm.com>
Tue, 22 May 2018 09:12:37 +0000 (14:42 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:43:37 +0000 (20:43 +1000)
commit25af86b2aeb60dd52bd18a875124490e23bd4515
tree0da13f3338cd72d753a1debda8ae0e5082f91f72
parente7a8ac433845aa86f39bf404ae4b7709f21c7d70
powerpc/perf: Unregister thread-imc if core-imc not supported

Since thread-imc internally use the core-imc hardware infrastructure
and is depended on it, having thread-imc in the kernel in the
absence of core-imc is trivial. Patch disables thread-imc, if
core-imc is not registered.

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/imc-pmu.h
arch/powerpc/perf/imc-pmu.c
arch/powerpc/platforms/powernv/opal-imc.c