Skip to contentSkip to conversation

Time runs too quickly on Cobalt

PATCH In review Scott Ashcroft 2 participants 2 messages Oct 6, 2006 – Oct 7, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Time runs too quickly on Cobalt

If I build a kernel with HZ==250 then time runs about 4 four times too quickly on my Cobalt RaQ2.

The following patch seems to fix it but I'm not sure this is the correct thing to do.

arch/mips/cobalt/setup.c +2 -2
index c01a017..f7c6eb2 100644
@@ -51,8 +51,8 @@ const char *get_system_type(void)
 
 void __init plat_timer_setup(struct irqaction *irq)
 {
-	/* Load timer value for 1KHz (TCLK is 50MHz) */
-	GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS);
+	/* Load timer value for HZ (TCLK is 50MHz) */
+	GALILEO_OUTL(50*1000*1000 / HZ, GT_TC0_OFS);
 
 	/* Enable timer */
 	GALILEO_OUTL(GALILEO_ENTC0 | GALILEO_SELTC0, GT_TC_CONTROL_OFS);
#1 lore raw
Quoted 5 lines · Scott Ashcroft

If I build a kernel with HZ==250 then time runs about 4 four times too quickly on my Cobalt RaQ2.

The following patch seems to fix it but I'm not sure this is the correct thing to do.

Looks right to me.