RAPL energy counter MSRs are exposed via perf PMU. But this is done by separate code which is not part of RAPL framework, and it cannot be reused by other RAPL Interface drivers like TPMI RAPL. Introduce two new APIs for PMU support in RAPL framework. This allows TPMI RAPL PMU support and also makes it possible for future cleanups of MSR RAPL PMU code. Commits from mainline kernel v6.10-rc1: 963a9ad3c589 powercap: intel_rapl_tpmi: Enable PMU support 575024a8aa7c powercap: intel_rapl: Introduce APIs for PMU support 72b8b94155d9 powercap: intel_rapl: Sort header files Note that to make RAPL PMU work, TPMI must be enabled in kernel with configs like below: CONFIG_INTEL_SPEED_SELECT_TPMI=m CONFIG_INTEL_UNCORE_FREQ_CONTROL_TPMI=m CONFIG_INTEL_TPMI=m CONFIG_INTEL_RAPL_TPMI=m
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3293