[RFC][PATCH] ppc misusing NTP's time_offset value

Mikael Pettersson mikpe at csd.uu.se
Thu Jun 30 20:15:22 EST 2005

On Wed, 29 Jun 2005 15:05:51 -0700, john stultz wrote:
>	As part of my timeofday rework, I've been looking at the NTP code and I
>noticed that the PPC architecture is apparently misusing the NTP's
>time_offset (it is a terrible name!) value as some form of timezone
>offset. This could cause problems when time_offset changed by the NTP
>	This patch changes the PPC code so it uses a more clear local variable:
>Could a PPC maintainer verify this is correct?
>Let me know if you have any comments or feedback.

arch/ppc/kernel/time.c used to have a 'static long time_offset;'
variable. Ulthough unrelated, this declaration clashed with the
one for kernel/time.c, causing compile-time errors with gcc4.
I submitted a fix for this in February, which renamed ppc's local
variable, and it was ACKed by Tom Rini and queued for 2.6.12.

However, the patch that actually went into 2.6.12 was different:
it just removed ppc's local variable, making arch/ppc/kernel/time.c
now share kernel/time.c's variable. At the time I assumed someone
had proved that the two modules _should_ share state, so I didn't
make a fuss about it.

Your patch brings the semantics back to what it was prior to 2.6.12.


More information about the Linuxppc-dev mailing list