Thread (6 messages) flat view 6 messages, 4 authors, 2005-10-05

Re: clock skew on B/W G3

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-10-04 22:17:10
Also in: lkml

On Tue, 2005-10-04 at 08:14 +0200, Marc wrote:
Hi,

given that this option causes problems on non i386 systems, may I propose to 
mark CONFIG_HZ as broken on these architectures and/or use a default value of 
1000 ? I guess this issue can't be fixed in a sane way until 2.6.14 is out.
The problem is indeed in via_calibrate_decr(). This routine works on
HZ/100 so it will not do any good with HZ not beeing a multiple of 100.

Can you test this patch ?

Index: linux-work/arch/ppc/platforms/pmac_time.c
===================================================================
--- linux-work.orig/arch/ppc/platforms/pmac_time.c	2005-09-22 14:06:18.000000000 +1000
+++ linux-work/arch/ppc/platforms/pmac_time.c	2005-10-05 08:14:17.000000000 +1000
@@ -195,7 +195,7 @@
 		;
 	dend = get_dec();
 
-	tb_ticks_per_jiffy = (dstart - dend) / (6 * (HZ/100));
+	tb_ticks_per_jiffy = (dstart - dend) / ((6 * HZ)/100);
 	tb_to_us = mulhwu_scale_factor(dstart - dend, 60000);
 
 	printk(KERN_INFO "via_calibrate_decr: ticks per jiffy = %u (%u ticks)\n",
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help