]> git.ipfire.org Git - thirdparty/linux.git/commit
tools/power turbostat: Allow probing RAPL with platform_features->rapl_msrs cleared
authorZhang Rui <rui.zhang@intel.com>
Sat, 17 May 2025 09:44:50 +0000 (17:44 +0800)
committerLen Brown <len.brown@intel.com>
Sun, 8 Jun 2025 18:10:16 +0000 (14:10 -0400)
commitff3d019e98db83ce2b5eb395333bc2518b37f4f0
treed97186cbb9f98397b42914073a0df772a17fcfcd
parent0362337968ad252e6563fff131906a43450d8940
tools/power turbostat: Allow probing RAPL with platform_features->rapl_msrs cleared

platform_features->rapl_msrs describes the RAPL MSRs supported. While
RAPL Perf counters can be exposed from different kernel backend drivers,
e.g. RAPL MSR I/F driver, or RAPL TPMI I/F driver.

Thus, turbostat should first blindly probe all the available RAPL Perf
counters, and falls back to the RAPL MSR counters if they are listed in
platform_features->rapl_msrs.

With this, platforms that don't have RAPL MSRs can clear the
platform_features->rapl_msrs bits and use RAPL Perf counters only.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c