Patch "cpufreq: intel_pstate: Fix energy_performance_preference for passive" has been added to the 5.10-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 energy_performance_preference for passive

to the 5.10-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-energy_performance_preferen.patch
and it can be found in the queue-5.10 subdirectory.

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



commit dd4c8bdc925f6e679059f6ea0d764a970b9169af
Author: Tero Kristo <tero.kristo@xxxxxxxxxxxxxxx>
Date:   Wed Jun 21 09:58:39 2023 +0300

    cpufreq: intel_pstate: Fix energy_performance_preference for passive
    
    [ Upstream commit 03f44ffb3d5be2fceda375d92c70ab6de4df7081 ]
    
    If the intel_pstate driver is set to passive mode, then writing the
    same value to the energy_performance_preference sysfs twice will fail.
    This is caused by the wrong return value used (index of the matched
    energy_perf_string), instead of the length of the passed in parameter.
    Fix by forcing the internal return value to zero when the same
    preference is passed in by user. This same issue is not present when
    active mode is used for the driver.
    
    Fixes: f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled")
    Reported-by: Niklas Neronin <niklas.neronin@xxxxxxxxx>
    Signed-off-by: Tero Kristo <tero.kristo@xxxxxxxxxxxxxxx>
    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 1686705bee7bd..4b06b81d8bb0a 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -777,6 +777,8 @@ static ssize_t store_energy_performance_preference(
 			err = cpufreq_start_governor(policy);
 			if (!ret)
 				ret = err;
+		} else {
+			ret = 0;
 		}
 	}
 



[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