Re: [PATCH 3/5] Deforest the function pointer jungle in the time code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Jun 2007, Franck Bui-Huu wrote:

> > I'll have a look at your patches, but I hope you have got about the most
> > interesting configuration right, which is the DEC platform
> 
> hmm, I looked at arch/mips/dec/time.c, and I'm not sure to understand it.
> Could you give me more info ?

 Whatever you like!

> To be sure we're taking about the same thing, I'm calling "hpt" the timer
> in CP0 _only_. If you have others timers let's call them "timer".

 We can agree on it for the purpose of this consideration, but otherwise 
HPT is meant to mean a High-Precision Counter, that is a counter that 
improves the resolution (precision) of that given by the timer interrupt 
itself.  This is how current code interpretes the name too.

> > where you can have one of these:
> >
> > 1. No HPT at all.
> >
> 
> What's generating the tick interrupt in this case ?

 For DEC an external DS1287 is always the timer interrupt source.  In this 
case this is the resolution you can get from gettimeofday() -- not 
terribly impressive.

> > 2. HPT in the chipset.
> >
> 
> What do you mean by chipset ? the DS1287 ?

 This is one of the motherboard components, called IOASIC.  Starting from 
a certain revision this chip includes a 32-bit free-running counter 
(timer) that is clocked from the TURBOchannel (the peripheral bus used in 
these systems) clock, which varies across systems, but is somewhere 
between 12.5MHz and 25MHz.

 Obviously the DS1287 does not include any kind of readable timer that 
could improve the resolution of the timer interrupt -- otherwise this 
whole complication would be a non-issue.

> > 3. HPT in CP0.
> >
> 
> Reading the dec code, it seems that whatever the case, you don't use
> the hpt cp0 as tick interrupt source. It's only use as a clock source.
> If so, why ?

 That is correct and there is no reason to use the CP0 timer interrupt as 
it has its issues (as mentioned in the other mail) and all the DEC systems 
that we support have a DS1287 chip that can generate a timer interrupt 
just fine.  The CP0 counter register is only used as a 32-bit free-running 
counter (timer) to improve the resolution of time recorded by timer 
interrupts.

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux