• Joris van Rantwijk's avatar
    [PATCH] Validate PM-Timer rate at boot time · 6d58b128
    Joris van Rantwijk authored
    Add a check to the PM-Timer initialization code.  It validates the PM-Timer
    rate against PIT channel 2 and rejects the PM-Timer if its rate is not
    withing 5% of the expected number.
    
    Rationale:
    
    The PMTMR timers of certain (older) mainboards are running at invalid
    rates, often much faster than the rate expected by the PM-Timer code.  This
    causes the system clock to run much too fast.  See also
    http://bugme.osdl.org/show_bug.cgi?id=2375
    
    Possible workarounds are disabling the PM-Timer in the kernel config or
    disabling the PM-Timer at boot time through the "clock=tsc" parameter.
    However, we believe it is more user friendly to automatically validate the
    PM-Timer rate at boot time before using it as the system time source.
    
    Tested by me (with broken timer) and John Stultz (with good timer) and
    believed to be ok.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6d58b128
timer_pm.c 5.95 KB