[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: cpufreq: intel_pstate: Fix processing for turbo activation ratio
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2016-04-30 0:48:59
Message-ID: 20160430004859.C0C84660F84 () gitolite ! kernel ! org
[Download RAW message or body]
Web: https://git.kernel.org/torvalds/c/1becf03545a0859ceaaf9e8c2d9861882a71cb01
Commit: 1becf03545a0859ceaaf9e8c2d9861882a71cb01
Parent: 94862a62dfe3ba1c7601115a2dc80721c5b256f0
Refname: refs/heads/master
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
AuthorDate: Fri Apr 22 19:53:59 2016 -0700
Committer: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
CommitDate: Mon Apr 25 23:39:09 2016 +0200
cpufreq: intel_pstate: Fix processing for turbo activation ratio
When the config TDP level is not nominal (level = 0), the MSR values for
reading level 1 and level 2 ratios contain power in low 14 bits and actual
ratio bits are at bits [23:16]. The current processing for level 1 and
level 2 is wrong as there is no shift done to get actual ratio.
Fixes: 6a35fc2d6c22 (cpufreq: intel_pstate: get P1 from TAR when available)
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/intel_pstate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 30fe323..f502d5b 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -813,6 +813,11 @@ static int core_get_max_pstate(void)
if (err)
goto skip_tar;
+ /* For level 1 and 2, bits[23:16] contain the ratio */
+ if (tdp_ctrl)
+ tdp_ratio >>= 16;
+
+ tdp_ratio &= 0xff; /* ratios are only 8 bits long */
if (tdp_ratio - 1 == tar) {
max_pstate = tar;
pr_debug("max_pstate=TAC %x\n", max_pstate);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic