summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-26 00:25:18 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 09:58:21 -0700
commit19923c190e0932bf0ac1e1d06a48f5c3678dd0de (patch)
tree2a32f5f16b3bbebd74c0f4910493c7f28a70fd84 /arch/powerpc/kernel/time.c
parent6415ce9a922a1446e7ee0ac9b016082232ebe373 (diff)
[PATCH] fix and optimize clock source update
This fixes the clock source updates in update_wall_time() to correctly track the time coming in via current_tick_length(). Optimize the fast paths to be as short as possible to keep the overhead low. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Acked-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 742f07a63161..7dd5dab789a1 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -102,7 +102,7 @@ EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */
u64 tb_to_xs;
unsigned tb_to_us;
-#define TICKLEN_SCALE (SHIFT_SCALE - 10)
+#define TICKLEN_SCALE TICK_LENGTH_SHIFT
u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */
u64 ticklen_to_xs; /* 0.64 fraction */
@@ -534,7 +534,7 @@ static __inline__ void timer_recalc_offset(u64 cur_tb)
if (__USE_RTC())
return;
- tlen = current_tick_length(SHIFT_SCALE - 10);
+ tlen = current_tick_length();
offset = cur_tb - do_gtod.varp->tb_orig_stamp;
if (tlen == last_tick_len && offset < 0x80000000u)
return;