Strange behaviour of adjtimex/settimeofday syscalls
Manuel Tobias Schiller
mala at hinterbergen.de
Sat Sep 3 20:03:42 EST 2005
Hi all,
I'm running Linux 2.4.31 on a G3. I usually synchronize the clocks on my
LAN using ntpd. Inspecting the kernel with the ntptime utility yields an
error exit code from ntp_adjtime() which won't clear for weeks (i.e. the
output line looks like this:
...
ntp_adjtime() returns code 5 (ERROR)
...
The members of the structure representing the kernel time PLL status etc
all look reasonable, and clock synchronisation using ntpd works quite
well - that's why I think there may be something wrong with the kernel
setting this error condition.)
Looking through the kernel source, I found that the ppc version of
do_settimeofday sets an error variable without clearing it anywhere.
Since other architectures don't do that, I applied the patch below to
avoid setting the error state.
I've been running with the modified kernel for almost a month now
without problems, so I think this patch might be interesting for the
general public (I haven't found anything similar with google). I'd like
to know what you think of it. If you think it's ok, it would be nice of
you if someone could make sure the patch makes it into mainstream
kernels. (The likelihood of the patch making it into the mainstream
kernels is just higher if more people have looked over it, so that's why
I'm posting it here, hoping for people that have more knowledge of these
things than I and are willing to test it).
Many thanks for your consideration.
Manuel Schiller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc-settimeofday.dif
Type: video/x-dv
Size: 1036 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20050903/ce3c000c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20050903/ce3c000c/attachment.pgp>
More information about the Linuxppc-dev
mailing list