Rune Torgersen runet at innovsys.com
Fri Aug 12 02:19:49 EST 2005

CLOCK_TICK_RATE is the basis for TIME_NSEC which is used to update xtime
on every timer interrupt, so it is very relevant for PPC.

CLOCK_TICK_RATE is used for LATCH which is used for ACTHZ which in turn
is used for TIME_NSEC

> -----Original Message-----
> From: Andreas Schwab [mailto:schwab at suse.de] 
> Sent: Thursday, August 11, 2005 11:15
> To: Rune Torgersen
> Cc: linuxppc-dev at ozlabs.org
> Subject: Re: CLOCK_TICK_RATE
> "Rune Torgersen" <runet at innovsys.com> writes:
> > Hi
> >
> > I have found that I need to set CLOCK_TICK_RATE (currently 
> defined in
> > include/asm-ppc/timex.h) to something else.
> I can't find any use of CLOCK_TICK_RATE in the kernel that is 
> relevant for
> ppc.

>From a previous thread in linux-ppc-embedded (Wall clock accuracy)
> -----Original Message-----
> From: George Anzinger [mailto:george at mvista.com] 
> Sent: Tuesday, August 09, 2005 19:07
> The problem here is that the CLOCK_TICK_RATE is not correctly 
> defined. 
> This should be the rate at which the decrementer is clocked in hertz. 
> If this is properly defined the tick_nsec value will be what 
> works to to 
> be an integral number of these that gives an nsec value less than or 
> equal to what LATCH says you should be using for the number of 
> decrementer counts in a jiffie.  It is important that this be 
> correctly 
> defined so that a) LATCH is right and b) the jiffies to/from 
> conversions 
> are done right.  These conversions rely on TICK_NSEC to get the right 
> answer.  (Also, so you don't step into a computing mess, it 
> is important 
> that these be defined at compile time so the compiler can do 
> the heavy 
> lifting.  If defined as variables the conversions will take a 
> LOT longer 
> (and use more code to boot).)
> If you are getting 999848, it would appear that you are using the x86 
> value which, I assume, is NOT right for a PPC, but then the 
> PPC is NOT 
> my strong suit...

More information about the Linuxppc-dev mailing list