aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-09-23 21:31:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-23 21:34:06 -0400
commite17ba8f51f69782abc4575dd30848ba5eafaa797 (patch)
tree534d829913806ce56e32f3d2e0404f3ab236bddf /arch
parent1ab9dd0902df4f4ff56fbf672220549090ab28ba (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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 094d3e35be18..b0b4feeec098 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -983,7 +983,7 @@ static struct time_interpolator sparc64_cpu_interpolator = {
983}; 983};
984 984
985/* The quotient formula is taken from the IA64 port. */ 985/* The quotient formula is taken from the IA64 port. */
986#define SPARC64_NSEC_PER_CYC_SHIFT 30UL 986#define SPARC64_NSEC_PER_CYC_SHIFT 10UL
987void __init time_init(void) 987void __init time_init(void)
988{ 988{
989 unsigned long clock = sparc64_init_timers(); 989 unsigned long clock = sparc64_init_timers();