• Jordan Hargrave's avatar
    [PATCH] x86_64: Fix drift with HPET timer enabled · b20367a6
    Jordan Hargrave authored
    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: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    b20367a6
timer.c 40.6 KB