powerpc/perf/hv-gpci: Add cpu hotplug support
authorKajol Jain <kjain@linux.ibm.com>
Sat, 3 Oct 2020 07:49:42 +0000 (13:19 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 7 Oct 2020 11:34:48 +0000 (22:34 +1100)
commitdcb5cdf60a1fbbdb3b4dd2abc562206481f09ef1
tree12c43e4e8ed857eae86eb62bea20a0516a4b419f
parent435387dd1f6fc03c64e3fdb4cc8737904c08a4db
powerpc/perf/hv-gpci: Add cpu hotplug support

Patch here adds cpu hotplug functions to hv_gpci pmu.
A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE" enum
is added.

The online callback function updates the cpumask only if its
empty. As the primary intention of adding hotplug support
is to designate a CPU to make HCALL to collect the
counter data.

The offline function test and clear corresponding cpu in a cpumask
and update cpumask to any other active cpu.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201003074943.338618-4-kjain@linux.ibm.com
arch/powerpc/perf/hv-gpci.c
include/linux/cpuhotplug.h