x86/cpufreq: Rework APERF/MPERF handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Nov 2021 16:28:24 +0000 (16:28 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 13:53:05 +0000 (13:53 +0000)
commit4dd16c44152f57f2f96d32e9a06fb7e259cde31b
treecde82578a67db6551b1d77fa449922486b55f7c6
parenteed4f94ddbf15e70da93a075a878c304f0a079cb
x86/cpufreq: Rework APERF/MPERF handling

Currently, each feature_detect() (called on CPU add) hook for both cpufreq
drivers duplicates cpu_has_aperfmperf in a per-cpu datastructure, and edits
cpufreq_driver.getavg to point at get_measured_perf().

As all parts of this are vendor-neutral, drop the function pointer and
duplicated boolean, and call get_measured_perf() directly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/cpufreq/cpufreq.c
xen/arch/x86/acpi/cpufreq/powernow.c
xen/drivers/cpufreq/utility.c
xen/include/acpi/cpufreq/cpufreq.h