Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bef45096 authored by Jan Beulich's avatar Jan Beulich Committed by Rafael J. Wysocki
Browse files

intel_idle: correct BXT support



Commit 5dcef694 ("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: default avatarJan Beulich <jbeulich@suse.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3451ab3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}