]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ntp: improve adjtimex frequency rounding
authorRoman Zippel <zippel@linux-m68k.org>
Mon, 22 Sep 2008 21:42:44 +0000 (14:42 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 24 Sep 2008 15:33:13 +0000 (17:33 +0200)
commitd40e944c25fb4642adb2a4c580a48218a9f3f824
tree9be7107440704a84d17f9dde12991915931c5279
parent5cd1c9c5cf30d4b33df3d3f74d8142f278d536b7
ntp: improve adjtimex frequency rounding

Change PPM_SCALE_INV_SHIFT so that it doesn't throw away any input bits
(19 is the amount of the factor 2 in PPM_SCALE), the output frequency
can then be calculated back to its input value, as the inverse divide
produce a slightly larger value, which is then correctly rounded by the
final shift.

Reported-by: Martin Ziegler <ziegler@uni-freiburg.de>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/timex.h
kernel/time/ntp.c