diff options
author | David S. Miller <davem@davemloft.net> | 2006-10-14 10:33:10 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-10-14 10:33:10 +0200 |
commit | 88ca8e7402aa6899de20ddc8e708831225583f8d (patch) | |
tree | 052cb8902109e1974d9f7832c4a73ae2a371b4ca /arch | |
parent | 5360ce880ede2fd89dd4aad73af627879faae122 (diff) |
[SPARC64]: Fix sched_clock() wrapping every ~17 seconds.
Unfortunately, sparc64 doesn't have an easy way to do a "64 X 64 -->
128" bit multiply like PowerPC and IA64 do. We were doing a
"64 X 64 --> 64" bit multiple which causes overflow very quickly with
a 30-bit quotient shift.
So use a quotientshift count of 10 instead of 30, just like x86 and
ARM do.
This also fixes the wrapping of printk timestamp values every ~17
seconds.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index a22930d62ad..0af3b8384e2 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -1039,7 +1039,7 @@ static struct time_interpolator sparc64_cpu_interpolator = { }; /* The quotient formula is taken from the IA64 port. */ -#define SPARC64_NSEC_PER_CYC_SHIFT 30UL +#define SPARC64_NSEC_PER_CYC_SHIFT 10UL void __init time_init(void) { unsigned long clock = sparc64_init_timers(); |