summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
authorjohn stultz2006-06-26 09:25:07 +0200
committerLinus Torvalds2006-06-26 18:58:20 +0200
commit260a42309b31cbc54eb4b6b85649e412bcad053f (patch)
tree51efc7bb51075b0d25d0e8465d3c056e6a57fe16 /arch/powerpc/kernel/time.c
parent[PATCH] Time: Use clocksource infrastructure for update_wall_time (diff)
downloadkernel-qcow2-linux-260a42309b31cbc54eb4b6b85649e412bcad053f.tar.gz
kernel-qcow2-linux-260a42309b31cbc54eb4b6b85649e412bcad053f.tar.xz
kernel-qcow2-linux-260a42309b31cbc54eb4b6b85649e412bcad053f.zip
[PATCH] Time: Let user request precision from current_tick_length()
Change the current_tick_length() function so it takes an argument which specifies how much precision to return in shifted nanoseconds. This provides a simple way to convert between NTPs internal nanoseconds shifted by (SHIFT_SCALE - 10) to other shifted nanosecond units that are used by the clocksource abstraction. Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r--arch/powerpc/kernel/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index d20907561f46..742f07a63161 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -534,7 +534,7 @@ static __inline__ void timer_recalc_offset(u64 cur_tb)
if (__USE_RTC())
return;
- tlen = current_tick_length();
+ tlen = current_tick_length(SHIFT_SCALE - 10);
offset = cur_tb - do_gtod.varp->tb_orig_stamp;
if (tlen == last_tick_len && offset < 0x80000000u)
return;