summaryrefslogtreecommitdiffstats
path: root/drivers/idle
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2016-06-27 00:35:48 -0600
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-09 01:05:30 +0200
commitbef450962597ff39a7f9d53a30523aae9eb55843 (patch)
treef5879aa2eade0e1a6fb8ecccc67a976e75b57e22 /drivers/idle
parent3451ab3ebf92b12801878d8b5c94845afd4219f0 (diff)
downloadlinux-bef450962597ff39a7f9d53a30523aae9eb55843.tar.gz
linux-bef450962597ff39a7f9d53a30523aae9eb55843.tar.bz2
linux-bef450962597ff39a7f9d53a30523aae9eb55843.zip
intel_idle: correct BXT support
Commit 5dcef69486 ("intel_idle: add BXT support") added an 8-element lookup array with just a 2-bit value used for lookups. As per the SDM that bit field is really 3 bits wide. While this is supposedly benign here, future re-use of the code for other CPUs might expose the issue. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/idle')
-rw-r--r--drivers/idle/intel_idle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 5300f2545e2a..9b2ef248788d 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1190,7 +1190,7 @@ static unsigned long long irtl_2_usec(unsigned long long irtl)
if (!irtl)
return 0;
- ns = irtl_ns_units[(irtl >> 10) & 0x3];
+ ns = irtl_ns_units[(irtl >> 10) & 0x7];
return div64_u64((irtl & 0x3FF) * ns, 1000);
}