]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
time: Move do_timer() to kernel/time/timekeeping.c
authorTorben Hohn <torbenh@gmx.de>
Thu, 27 Jan 2011 14:58:55 +0000 (15:58 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 31 Jan 2011 13:55:41 +0000 (14:55 +0100)
do_timer() is primary timekeeping related. calc_global_load() is
called from do_timer() as well, but that's more for historical
reasons.

[ tglx: Fixed up the calc_global_load() reject andmassaged changelog ]

Signed-off-by: Torben Hohn <torbenh@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
LKML-Reference: <20110127145855.23248.56933.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/time.h
kernel/time/timekeeping.c
kernel/timer.c

index 1e6d3b59238d3d69f8b1963b2c457451fc60513a..86a9c487fdd8bf25d809491dc4543328bd2b112d 100644 (file)
@@ -166,7 +166,6 @@ extern void monotonic_to_bootbased(struct timespec *ts);
 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
 extern int timekeeping_valid_for_hres(void);
 extern u64 timekeeping_max_deferment(void);
-extern void update_wall_time(void);
 extern void timekeeping_leap_insert(int leapsecond);
 
 struct tms;
index d27c7562902cbe3aa2472292bd813c1eee8c1ecb..c1a178ca0f50da3ebef2bd8935f5917edefb2255 100644 (file)
@@ -779,7 +779,7 @@ static cycle_t logarithmic_accumulation(cycle_t offset, int shift)
  *
  * Called from the timer interrupt, must hold a write on xtime_lock.
  */
-void update_wall_time(void)
+static void update_wall_time(void)
 {
        struct clocksource *clock;
        cycle_t offset;
@@ -946,3 +946,15 @@ struct timespec get_monotonic_coarse(void)
                                now.tv_nsec + mono.tv_nsec);
        return now;
 }
+
+/*
+ * The 64-bit jiffies value is not atomic - you MUST NOT read it
+ * without sampling the sequence number in xtime_lock.
+ * jiffies is defined in the linker script...
+ */
+void do_timer(unsigned long ticks)
+{
+       jiffies_64 += ticks;
+       update_wall_time();
+       calc_global_load(ticks);
+}
index 43ca9936f2d06a2cba572f1c877406f9281e68a3..87f656cc2a557e753c9c1f44ee1a629d1330e57d 100644 (file)
@@ -1293,19 +1293,6 @@ void run_local_timers(void)
        raise_softirq(TIMER_SOFTIRQ);
 }
 
-/*
- * The 64-bit jiffies value is not atomic - you MUST NOT read it
- * without sampling the sequence number in xtime_lock.
- * jiffies is defined in the linker script...
- */
-
-void do_timer(unsigned long ticks)
-{
-       jiffies_64 += ticks;
-       update_wall_time();
-       calc_global_load(ticks);
-}
-
 #ifdef __ARCH_WANT_SYS_ALARM
 
 /*