Override timer interrupt

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Oct 16 06:55:53 EST 2007


On Mon, 2007-10-15 at 11:49 -0500, Rune Torgersen wrote:
> 
> The main couse is that our main bus frequency cannort be divided into
> 1kHz evently by the decrementer.
> Main bus freq = 99532800 Hz.
> Decrementer then becomes 24883, which gives us 999991.9624485600nsec
> per
> jiffy.
> That is not a number easilly converted into time without drift.
> 
> Changing HZ to 100 fixes it, but is for varous reasons not an option
> right now.
> 
> What I did do is change the timer interrupt to be called by an
> ecxternal
> 1kHz interrupt source instead of the decrementer.
> 
> The TB register is only ued for offsets from the last jiffie, not as a
> continous offset, so then it works out pretty good.
> There is a discontinuity in the sub ms resolution of the clock that I
> can live with. msec and up are dead accurate.

The date is derived from the absolute TB value though...

Ben.




More information about the Linuxppc-embedded mailing list