summaryrefslogtreecommitdiff
path: root/kernel/time.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2005-04-28 08:13:58 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-28 08:13:58 -0700
commit9acf6597c533f3d5c991f730c6a1be296679018e (patch)
tree8e567fd0f45d16c4656e7e9a42c7d4749d19ca48 /kernel/time.c
parentbdceb6a0162274934386f19f3ea5a9d44feb0b20 (diff)
[PATCH] time interpolator: Fix settimeofday inaccuracy
settimeofday will set the time a little bit too early on systems using time interpolation since it subtracts the current interpolator offset from the time. This used to be necessary with the code in 2.6.9 and earlier but the new code resets the time interpolator after setting the time. Thus the time is set too early and gettimeofday will return a time slightly before the time specified with settimeofday if invoked immeditely after settimeofday. This removes the obsolete subtraction of the time interpolator offset and makes settimeofday set the time accurately. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/time.c')
-rw-r--r--kernel/time.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/kernel/time.c b/kernel/time.c
index 96fd0f49963..d4335c1c884 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -516,14 +516,6 @@ int do_settimeofday (struct timespec *tv)
write_seqlock_irq(&xtime_lock);
{
- /*
- * This is revolting. We need to set "xtime" correctly. However, the value
- * in this location is the value at the most recent update of wall time.
- * Discover what correction gettimeofday would have done, and then undo
- * it!
- */
- nsec -= time_interpolator_get_offset();
-
wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);