[3.11.y.z extended stable] Patch "intel_pstate: Correct calculation of min pstate value" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Fri Feb 14 10:11:07 UTC 2014


This is a note to let you know that I have just added a patch titled

    intel_pstate: Correct calculation of min pstate value

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From b5848c8e3df03c1504be6fcbcd4256ff121d221d Mon Sep 17 00:00:00 2001
From: Dirk Brandewie <dirk.j.brandewie at intel.com>
Date: Mon, 21 Oct 2013 09:20:33 -0700
Subject: intel_pstate: Correct calculation of min pstate value

commit 7244cb62d96e735847dc9d08f870550df896898c upstream.

The minimum pstate is supposed to be a percentage of the maximum P
state available.  Calculate min using max pstate and not the
current max which may have been limited by the user

Signed-off-by: Dirk Brandewie <dirk.j.brandewie at intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
Cc: Zhang, Xiong Y <xiong.y.zhang at intel.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/cpufreq/intel_pstate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 50392ac..e52e542 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -366,12 +366,13 @@ static int intel_pstate_turbo_pstate(void)
 static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max)
 {
 	int max_perf = cpu->pstate.turbo_pstate;
+	int max_perf_adj;
 	int min_perf;
 	if (limits.no_turbo)
 		max_perf = cpu->pstate.max_pstate;

-	max_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf));
-	*max = clamp_t(int, max_perf,
+	max_perf_adj = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf));
+	*max = clamp_t(int, max_perf_adj,
 			cpu->pstate.min_pstate, cpu->pstate.turbo_pstate);

 	min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf));
--
1.8.3.2





More information about the kernel-team mailing list