lkml.org 
[lkml]   [2010]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/3] Try to convert non-trivial clocksources to clocksource_register_hz
On Mon, 10 May 2010 12:19:10 -0700
john stultz <johnstul@us.ibm.com> wrote:

> On Mon, 2010-05-10 at 17:53 +0200, Martin Schwidefsky wrote:
> > On Fri, 30 Apr 2010 18:36:25 -0700 John Stultz <johnstul@us.ibm.com> wrote:
> > The s390 conversion to clocksource_register_khz looks good - at least
> > the kilo hertz value is correct. Bit 2^12 of the TOD value are
> > microseconds, which makes one millisecond (1000<<12).
>
> Thanks for the review!
>
> However, is there a more straightforward frequency value that we could
> use? Is 4096000000 hz really the correct value or is there something
> more precise?

From the principles of operation manual 4-37:
The TOD clock nominally is incremented by adding a one in bit position
51 every microsecond. In models having a higher or lower resolution, a
different bit position is incremented at such a frequency that the rate
of advancing the clock is the same as if a one were added in bit
position 51 every microsecond. The resolution of the TOD clock is such
that the incrementing rate is comparable to the instruction-execution
rate of the model.

Remember that the bit numbering in IBM manuals starts with 0 for the
most significant bit (bit 51 == 2^12 for a 64 bit value). The quality
of the TOD clock is very good, with ETR or STP it will be drifted to an
external time source with a precision in the range of microseconds
(you could think of it as NTP in hardware / microcode).
If there is a clocksource register function that takes a microsecond
value we could improve the precision.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-05-12 10:15    [W:0.088 / U:2.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site