aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-26 03:25:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:21 -0400
commit19923c190e0932bf0ac1e1d06a48f5c3678dd0de (patch)
tree2a32f5f16b3bbebd74c0f4910493c7f28a70fd84 /arch/powerpc
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')
-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 */
102u64 tb_to_xs; 102u64 tb_to_xs;
103unsigned tb_to_us; 103unsigned tb_to_us;
104 104
105#define TICKLEN_SCALE (SHIFT_SCALE - 10) 105#define TICKLEN_SCALE TICK_LENGTH_SHIFT
106u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */ 106u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */
107u64 ticklen_to_xs; /* 0.64 fraction */ 107u64 ticklen_to_xs; /* 0.64 fraction */
108 108
@@ -534,7 +534,7 @@ static __inline__ void timer_recalc_offset(u64 cur_tb)
534 534
535 if (__USE_RTC()) 535 if (__USE_RTC())
536 return; 536 return;
537 tlen = current_tick_length(SHIFT_SCALE - 10); 537 tlen = current_tick_length();
538 offset = cur_tb - do_gtod.varp->tb_orig_stamp; 538 offset = cur_tb - do_gtod.varp->tb_orig_stamp;
539 if (tlen == last_tick_len && offset < 0x80000000u) 539 if (tlen == last_tick_len && offset < 0x80000000u)
540 return; 540 return;