]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: keep track of original clocksource frequency
authorJohn Stultz <johnstul@us.ibm.com>
Wed, 20 Aug 2008 23:37:28 +0000 (16:37 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 21 Aug 2008 07:50:23 +0000 (09:50 +0200)
commit9dbac80a8778ee70880868114349ca7c3fefc307
treedde8d56d000c7885c43df0e61f72f4a75d5759fe
parent08cadd1b8aa8d020611d68aba5e50dd3d5272ceb
clocksource: keep track of original clocksource frequency

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: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/clocksource.h
kernel/time/clocksource.c
kernel/time/jiffies.c