Continual reading from the PowerPc time base register is not stable

Kim Phillips kim.phillips at freescale.com
Thu Apr 22 10:44:19 EST 2010


On Sat, 10 Apr 2010 11:14:09 +0800
Csdncannon <csdncannon at gmail.com> wrote:

> Sorry, I attached the wrong log, this attachment is the right one.
> 
> 2010/3/25 Csdncannon <csdncannon at gmail.com>
> 
> >          In my program, the value of the 64-bit time base register is read
> > out, and you will find the later value is even smaller than the earlier
> > value from the log “log_timebase”. While the kernel depends on the accuracy
> > of the timebase for the compensation of the lost PIT interrupt, the negative
> > value between two continual timebase reading will bring to the jump of the
> > jiffies. And this timebase problem will bring to the instability of the
> > gettimeofday system call.
> >
> >          Do you have any idea about this problem, thanks for your any
> > advice. Attached is the code and log.

Hi, has this been resolved yet?

I took an 8377 rdb board, and let it run timebase.c (with the isync &
long long casts) all weekend, and have failed to reproduce the issue.
That was on linux 2.6.33, and I've got another machine running the same
thing under 2.6.28 for the last couple of hours, still unable to
reproduce the issue.

Can you please answer the "custom board or FSL reference board"
question, try duplicating with a newer kernel version, discuss other
time sources that may be running on your system (RTC_DRV, ntp service),
post a .config, ...

Kim


More information about the Linuxppc-dev mailing list