]> www.infradead.org Git - users/dwmw2/linux.git/commit
cpufreq: intel_pstate: Clear hybrid_max_perf_cpu before driver registration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 4 Nov 2024 18:51:28 +0000 (19:51 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 4 Nov 2024 21:51:10 +0000 (22:51 +0100)
commita97e293e077a3e8f41e8972e593b34d0052b9e25
treec50a8db9203aaa1c4c448f50d679009d4bdc7b0d
parent59b723cd2adbac2a34fc8e12c74ae26ae45bf230
cpufreq: intel_pstate: Clear hybrid_max_perf_cpu before driver registration

Modify intel_pstate_register_driver() to clear hybrid_max_perf_cpu
before calling cpufreq_register_driver(), so that asymmetric CPU
capacity scaling is not updated until hybrid_init_cpu_capacity_scaling()
runs down the road.  This is done in preparation for a subsequent
change adding asymmetric CPU capacity computation to the CPU init path
to handle CPUs that are initially offline.

The information on whether or not hybrid_max_perf_cpu was NULL before
it has been cleared is passed to hybrid_init_cpu_capacity_scaling(),
so full initialization of CPU capacity scaling can be skipped if it
has been carried out already.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/4616631.LvFx2qVVIh@rjwysocki.net
drivers/cpufreq/intel_pstate.c