Patch "cpufreq: intel_pstate: Fix cpu->pstate.turbo_freq initialization" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cpufreq: intel_pstate: Fix cpu->pstate.turbo_freq initialization

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cpufreq-intel_pstate-fix-cpu-pstate.turbo_freq-initi.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fd66ba8dcbdcdd4b037771536526c1874afe27a2
Author: Zhang Rui <rui.zhang@xxxxxxxxx>
Date:   Tue Oct 26 16:32:42 2021 +0800

    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@xxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index e7cd3882bda4d..2789cad7403d8 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -615,9 +615,8 @@ static void intel_pstate_hybrid_hwp_calibrate(struct cpudata *cpu)
 	 * the scaling factor is too high, so recompute it so that the HWP_CAP
 	 * highest performance corresponds to the maximum turbo frequency.
 	 */
-	if (turbo_freq < cpu->pstate.turbo_pstate * scaling) {
-		pr_debug("CPU%d: scaling too high (%d)\n", cpu->cpu, scaling);
-
+	cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * scaling;
+	if (turbo_freq < cpu->pstate.turbo_freq) {
 		cpu->pstate.turbo_freq = turbo_freq;
 		scaling = DIV_ROUND_UP(turbo_freq, cpu->pstate.turbo_pstate);
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux