On 12.11.2021 19:28, Andrew Cooper wrote:
> 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.coop...@citrix.com>
> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Roger Pau Monné <roger....@citrix.com>
> CC: Wei Liu <w...@xen.org>
> 
> Slightly RFC.  This does introduce an arch-specific call into a nominally
> arch-neutral driver, but struct cpufreq_policy already had x86-specifics in it
> so this is apparently ok.

That's fine for the time being; disentangling for another arch to use the
driver would be quite a bit of work anyway.

Reviewed-by: Jan Beulich <jbeul...@suse.com>

Jan


Reply via email to