RE: Override timer interrupt

2007-10-15 Thread Paul Mackerras
Rune Torgersen writes: > 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 91.9624485600nsec per > jiffy. > That is not a number easilly converted into time wi

RE: Override timer interrupt

2007-10-15 Thread Benjamin Herrenschmidt
On Mon, 2007-10-15 at 16:50 -0500, Rune Torgersen wrote: > Huh? Not in 2.6.18/arch/ppc at least, unless I'm completely > misundrstanding the code. > ppc/powerpc seems to be using clocksource_jiffies as the clock source, > and teh gettimeofday gets xtime + a offset from last jiffie, and xtime > is

RE: Override timer interrupt

2007-10-15 Thread Rune Torgersen
> From: Benjamin Herrenschmidt> > > The TB register is only ued for offsets from the last > jiffie, not as a > > continous offset, so then it works out pretty good. > > The date is derived from the absolute TB value though... Huh? Not in 2.6.18/arch/ppc at least, unless I'm completely misundrsta

RE: Override timer interrupt

2007-10-15 Thread Benjamin Herrenschmidt
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 91.9624485600nsec > per > jiffy. > That is not

RE: Override timer interrupt

2007-10-15 Thread Rune Torgersen
> From: Benjamin Herrenschmidt > 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 c

RE: Override timer interrupt

2007-10-12 Thread Benjamin Herrenschmidt
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 ea

Re: Override timer interrupt

2007-10-12 Thread Mark A. Greer
On Fri, Oct 12, 2007 at 04:39:53PM -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

RE: Override timer interrupt

2007-10-12 Thread Rune Torgersen
> 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 examp

Re: Override timer interrupt

2007-10-12 Thread Mark A. Greer
On Fri, Oct 12, 2007 at 03:49:02PM -0500, Rune Torgersen wrote: > Is there an easy way to use something other than the decrementer for the > timer interrupt? > > Reason i'm asking is tha t on our board, the decrementer cannot be > divided to 1khz evenly, so we have rounding errors for time, but we