]> Gentwo Git Trees - linux/.git/commit
tools/power turbostat: Check for non-zero value when MSR probing
authorPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Tue, 14 Jan 2025 15:11:28 +0000 (16:11 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 15 Jan 2025 01:05:20 +0000 (19:05 -0600)
commit2f198c219accef68db7f4acd3c610ce853b58787
treec81fb0556267dccf023356f5d1c5775420dba5e7
parentaf0e673ba9a92eba5fda7420c0e0f233285e9c38
tools/power turbostat: Check for non-zero value when MSR probing

For some MSRs, for example, the Platform Energy Counter (RAPL PSYS), it
is required to additionally check for a non-zero value to confirm that
it is present.

From Intel SDM vol. 4:

    Platform Energy Counter (R/O)
    This MSR is valid only if both platform vendor hardware
    implementation and BIOS enablement support it.
    This MSR will read 0 if not valid.

Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c