mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[PATCH] x86_64: Fix drift with HPET timer enabled
If the HPET timer is enabled, the clock can drift by ~3 seconds a day. This is due to the HPET timer not being initialized with the correct setting (still using PIT count). If HZ changes, this drift can become even more pronounced. HPET patch initializes tick_nsec with correct tick_nsec settings for HPET timer. Vojtech comments: "It's not entirely correct (it assumes the HPET ticks totally exactly), but it's significantly better than assuming the PIT error there." Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
49c93e84d8
commit
b20367a6c2
5 changed files with 12 additions and 1 deletions
|
|
@ -89,6 +89,7 @@
|
|||
* then 32 bit HPET counter wrapsaround in less than 0.5 sec.
|
||||
*/
|
||||
#define HPET_MIN_PERIOD (100000UL)
|
||||
#define HPET_TICK_RATE (HZ * 100000UL)
|
||||
|
||||
extern unsigned long hpet_tick; /* hpet clks count per tick */
|
||||
extern unsigned long hpet_address; /* hpet memory map physical address */
|
||||
|
|
|
|||
Loading…
Reference in a new issue