[patch 5/5] powerpc 2.6.21-rt1] fix clocksource_timebase.shift value

Tsutomu OWA tsutomu.owa at toshiba.co.jp
Mon May 14 18:23:17 EST 2007


Calculate clocksource_timebase.shift from tb_ticks_per_jiffy to get an
accurate translation, though I don't understand why current version of 
clocksource_timebase.shift could be constant...

Signed-off-by: Tsutomu OWA <tsutomu.owa at toshiba.co.jp>
-- owa

--- linux-2.6.21-rt1/arch/powerpc/kernel/time.c	2007-05-09 18:05:57.000000000 +0900
+++ rt/arch/powerpc/kernel/time.c	2007-05-09 18:06:24.000000000 +0900
@@ -945,6 +945,9 @@ static int __init init_timebase_clocksou
 	if (__USE_RTC())
 		return -ENODEV;
 
+#ifdef CONFIG_PPC64
+	clocksource_timebase.shift = tb_ticks_per_jiffy / 1000000;
+#endif
 	clocksource_timebase.mult = clocksource_hz2mult(tb_ticks_per_sec,
 					clocksource_timebase.shift);
 	return clocksource_register(&clocksource_timebase);




More information about the Linuxppc-dev mailing list