]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "time: Move common updates to a function"
authorGuangyu Sun <guangyu.sun@oracle.com>
Thu, 4 Oct 2012 22:46:58 +0000 (15:46 -0700)
committerGuangyu Sun <guangyu.sun@oracle.com>
Thu, 4 Oct 2012 22:46:58 +0000 (15:46 -0700)
This reverts commit 20bb7a289f986cfda97d2dd5b9d035f32b9c103e.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
kernel/time/timekeeping.c

index d9efcdd37bfd6e55526dbecbc7f3ff7c9cd9d71b..4e6cd20a1683d8b83c036f1ab6d3ce594f4145fc 100644 (file)
@@ -166,19 +166,6 @@ static struct timespec total_sleep_time;
  */
 static struct timespec raw_time;
 
-/* must hold write on xtime_lock */
-static void timekeeping_update(bool clearntp)
-{
-       if (clearntp) {
-               timekeeper.ntp_error = 0;
-               ntp_clear();
-       }
-       update_vsyscall(&xtime, &wall_to_monotonic,
-                        timekeeper.clock, timekeeper.mult);
-}
-
-
-
 /* flag for if timekeeping is suspended */
 int __read_mostly timekeeping_suspended;
 
@@ -388,7 +375,11 @@ int do_settimeofday(const struct timespec *tv)
 
        xtime = *tv;
 
-       timekeeping_update(true);
+       timekeeper.ntp_error = 0;
+       ntp_clear();
+
+       update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock,
+                               timekeeper.mult);
 
        write_sequnlock_irqrestore(&xtime_lock, flags);
 
@@ -421,7 +412,11 @@ int timekeeping_inject_offset(struct timespec *ts)
        xtime = timespec_add(xtime, *ts);
        wall_to_monotonic = timespec_sub(wall_to_monotonic, *ts);
 
-       timekeeping_update(true);
+       timekeeper.ntp_error = 0;
+       ntp_clear();
+
+       update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock,
+                               timekeeper.mult);
 
        write_sequnlock_irqrestore(&xtime_lock, flags);
 
@@ -644,7 +639,10 @@ void timekeeping_inject_sleeptime(struct timespec *delta)
 
        __timekeeping_inject_sleeptime(delta);
 
-       timekeeping_update(true);
+       timekeeper.ntp_error = 0;
+       ntp_clear();
+       update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock,
+                               timekeeper.mult);
 
        write_sequnlock_irqrestore(&xtime_lock, flags);
 
@@ -949,7 +947,9 @@ static void update_wall_time(void)
                wall_to_monotonic.tv_sec -= leap;
        }
 
-       timekeeping_update(false);
+       /* check to see if there is a new clocksource to use */
+       update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock,
+                               timekeeper.mult);
 }
 
 /**