[GIT PULL] Power management fixes for v6.4-rc3

From: Rafael J. Wysocki
Date: Fri May 19 2023 - 11:30:13 EST


Hi Linus,

Please pull from the tag

git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
pm-6.4-rc3

with top-most commit 5783ecc90e24a870a563b1acbfd13cad3786e519

Merge branch 'pm-tools'

on top of commit f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6

Linux 6.4-rc2

to receive power management fixes for 6.4-rc3.

These fix two issues in the cpupower utility and get rid of a spurious
warning message printed to the kernel log by the ACPI cpufreq driver
after recent changes.

Specifics:

- Get rid of a warning message printed by the ACPI cpufreq driver
after recent changes in it when anohter CPU performance scaling
driver is registered already when it starts (Petr Pavlu).

- Make cpupower read TSC on each CPU right before reading MPERF so as
to reduce the potential time difference between the TSC and MPERF
accesses and improve the C0 percentage calculation (Wyes Karny).

- Fix a possible file handle leak and clean up the code in the
sysfs_get_enabled() function in cpupower (Hao Zeng).

Thanks!


---------------

Hao Zeng (1):
cpupower:Fix resource leaks in sysfs_get_enabled()

Petr Pavlu (1):
cpufreq: ACPI: Prevent a warning when another frequency driver is loaded

Wyes Karny (1):
cpupower: Make TSC read per CPU for Mperf monitor

---------------

drivers/cpufreq/acpi-cpufreq.c | 2 +-
drivers/cpufreq/pcc-cpufreq.c | 2 +-
tools/power/cpupower/lib/powercap.c | 23 +++++++++++-----
.../cpupower/utils/idle_monitor/mperf_monitor.c | 31 ++++++++++------------
4 files changed, 32 insertions(+), 26 deletions(-)