cpufreq: intel_pstate: Fix cpu->pstate.turbo_freq initialization
authorZhang Rui <rui.zhang@intel.com>
Tue, 26 Oct 2021 08:32:42 +0000 (16:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:42 +0000 (19:16 +0100)
commitca5c67889bd6d68c03d9debff927d4b4dc5c20b7
treef8db5cb35ffe2477e7a4ac0667bfb10f99b08a93
parent4d9b7edfdcf2d191d4279749d0b8b7ce35fd3ea5
cpufreq: intel_pstate: Fix cpu->pstate.turbo_freq initialization

[ Upstream commit c72bcf0ab87a92634e58af62e89af0f40dfd0b88 ]

Fix a problem in active mode that cpu->pstate.turbo_freq is initialized
only if HWP-to-frequency scaling factor is refined.

In passive mode, this problem is not exposed, because
cpu->pstate.turbo_freq is set again, later in
intel_cpufreq_cpu_init()->intel_pstate_get_hwp_cap().

Fixes: eb3693f0521e ("cpufreq: intel_pstate: hybrid: CPU-specific scaling factor")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/intel_pstate.c