Override timer interrupt

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Oct 13 08:58:14 EST 2007


On Fri, 2007-10-12 at 16:39 -0500, Rune Torgersen wrote:
> > From: Mark A. Greer 
> > > Is there an easy way to use something other than the decrementer for
> the
> > > timer interrupt?
> 
> > Check out the clocksource stuff.  It let's you set up numerous clock
> > sources and set the rating of each one.  You can start looking in
> > arch/powerpc/kernel/time.c for example code.
> 
> Thanks I will. 
> Currently our board port lives in /arch/ppc (2.6.18) but I will take a
> look in powerpc.

Beware though... there a quite a few bits in there that assume the
timebase is being used as the main timekeeping source, like the vdso.

In fact, I'm not sure what is your problem with the DEC proper as the TB
will be used ultimately and thus it shouldn't drift more than the TB
does. Can your part use an externally clocked TB ?

If not, and you still have a drift despite calibration, you can always
use NTP services to adjust timekeeping.

Ben.
 



More information about the Linuxppc-embedded mailing list