Subject: Re: LP64 bug of ntp? (Re: mk48txx(4) tod clock driver cleanup)
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-kern
Date: 11/10/2003 12:31:02
tsutsui@ceres.dti.ne.jp said:
> I've just remembered bin/11465 (submitted by myself), 

There is a similar bug in "kerninfo", for the frequency.
(The same value is packed into 2 different types, depending
on what command you use... this code sucks.)
These sign extension bugs are both present in ntp-4.2; I'm
collecting patches which fix this once 4.2 is imported.

> % ntpdc -c loop
> offset:               -0.063699 s
> frequency:            -500.000 ppm

This doesn't happen on alpha. Probably an endian thing, but
the (4.2) code looks OK at a first glance. (NTOHL_FP uses ntohl
internally)
You could try to query the sparc64 from an LE box and vice-versa,
and you could uncomment the WORDS_BIGENDIAN in
src/usr.sbin/ntp/include/config.h und see whether it makes a
difference.
I wouldn't put much effort into the in-tree ntp however. Better
try 4.2 to shake the bugs out.

best regards
Matthias