powerpc/perf: Add nest IMC PMU support
authorAnju T Sudhakar <anju@linux.vnet.ibm.com>
Tue, 18 Jul 2017 21:36:34 +0000 (03:06 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 25 Jul 2017 12:55:45 +0000 (22:55 +1000)
commit885dcd709ba9120b9935415b8b0f9d1b94e5826b
tree627fa60844403620c01545be2dee1fbdb955fdf8
parent8f95faaac56c18b32d0e23ace55417a440abdb7e
powerpc/perf: Add nest IMC PMU support

Add support to register Nest In-Memory Collection PMU counters.
Patch adds a new device file called "imc-pmu.c" under powerpc/perf
folder to contain all the device PMU functions.

Device tree parser code added to parse the PMU events information
and create sysfs event attributes for the PMU.

Cpumask attribute added along with Cpu hotplug online/offline functions
specific for nest PMU. A new state "CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE"
added for the cpu hotplug callbacks. Error handle path frees the memory
and unregisters the CPU hotplug callbacks.

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/perf/Makefile
arch/powerpc/perf/imc-pmu.c [new file with mode: 0644]
arch/powerpc/platforms/powernv/opal-imc.c
include/linux/cpuhotplug.h