linux/tools/power
Zhang Rui 4d1827485a tools/power/turbostat: Fix failure with new uncore sysfs
On some platforms, turbostat fails during launch time like below,

turbostat version 2023.03.17 - Len Brown <lenb@kernel.org>
...
cpu40: MSR_IA32_PACKAGE_THERM_STATUS: 0x884c0000 (24 C)
cpu40: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
turbostat: snapshot_sysfs_counter(/sys/devices/system/cpu/intel_uncore_frequency/package_00_die_00/current_freq_khz): No data available

This is because new uncore sysfs is used on these platforms as
introduced by commit 9b8dea80e3 ("platform/x86/intel-uncore-freq:
Support for cluster level controls").

With the new uncore sysfs interface,
/sys/devices/system/cpu/intel_uncore_frequency/package_00_die_00/current_freq_khz
is still available, but reading it fails.

How to support the fabric cluster level uncore sysfs is not settled yet,
as a short term fix, clear the BIC_UNCORE_MHZ bit when new sysfs I/F is
detected.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
2023-09-27 22:14:17 +08:00
..
acpi ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
cpupower cpupower: Add Georgian translation to Makefile LANGUAGES 2023-08-17 14:28:16 -06:00
pm-graph PM: tools: sleepgraph: Recognize "CPU killed" messages 2023-03-27 19:24:08 +02:00
x86 tools/power/turbostat: Fix failure with new uncore sysfs 2023-09-27 22:14:17 +08:00