From 54d3cde7950f426abd2d1479ceca4dc75173b8f2 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 27 Jun 2016 00:35:48 -0600 Subject: [PATCH] intel_idle: correct BXT support Orabug: 24810432 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 Signed-off-by: Rafael J. Wysocki (cherry picked from commit bef450962597ff39a7f9d53a30523aae9eb55843) Signed-off-by: Brian Maly --- drivers/idle/intel_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 6874a2c361d0..22473db328a1 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -1158,7 +1158,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); } -- 2.50.1