Skip to content

Commit

Permalink
intel_idle: correct BXT support
Browse files Browse the repository at this point in the history
Commit 5dcef69 ("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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
jbeulich authored and rafaeljw committed Jul 8, 2016
1 parent 3451ab3 commit bef4509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit bef4509

Please sign in to comment.