• J
    clocksource: keep track of original clocksource frequency · 1aa5dfb7
    John Stultz 提交于
    The clocksource frequency is represented by
    clocksource->mult/2^(clocksource->shift).  Currently, when NTP makes
    adjustments to the clock frequency, they are made directly to the mult
    value.
    
    This has the drawback that once changed, we cannot know what the orignal
    mult value was, or how much adjustment has been applied.
    
    This property causes problems in calculating proper ntp intervals when
    switching back and forth between clocksources.
    
    This patch separates the current mult value into a mult and mult_orig
    pair.  The mult_orig value stays constant, while the ntp clocksource
    adjustments are done only to the mult value.
    
    This allows for correct ntp interval calculation and additionally lays the
    groundwork for a new notion of time, what I'm calling the monotonic-raw
    time, which is introduced in a following patch.
    Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
    Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    1aa5dfb7
clocksource.h 6.6 KB