perf/x86/rapl: Move the pmu allocation out of CPU hotplug
authorKan Liang <kan.liang@linux.intel.com>
Thu, 10 Oct 2024 14:26:03 +0000 (07:26 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 30 Oct 2024 21:42:18 +0000 (22:42 +0100)
commit9b99d65c0bb4e37013bc2ec9c32b78c5751ff952
tree2b1e27d1d6c68a7fd6962aa3690f41bc82945570
parent4d756095d3994cb41393817dc696b458938a6bd0
perf/x86/rapl: Move the pmu allocation out of CPU hotplug

There are extra codes in the CPU hotplug function to allocate rapl pmus.
The generic PMU hotplug support is hard to be applied.

As long as the rapl pmus can be allocated upfront for each die/socket,
the code doesn't need to be implemented in the CPU hotplug function.
Move the code to the init_rapl_pmus(), and allocate a PMU for each
possible die/socket.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Oliver Sang <oliver.sang@intel.com>
Link: https://lore.kernel.org/r/20241010142604.770192-1-kan.liang@linux.intel.com
arch/x86/events/rapl.c