summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorTorben Hohn <torbenh@gmx.de>2011-01-27 15:58:55 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-01-31 14:55:41 +0100
commit871cf1e5f2a17702f58539a3af8b18fc8666ad4c (patch)
treeda80fbad2c79dee33d4ac559c8881ce4c77476b7 /kernel/time
parent70d1f365568e0cdbc9f4ab92428e1830fdb09ab0 (diff)
downloadop-kernel-dev-871cf1e5f2a17702f58539a3af8b18fc8666ad4c.zip
op-kernel-dev-871cf1e5f2a17702f58539a3af8b18fc8666ad4c.tar.gz
time: Move do_timer() to kernel/time/timekeeping.c
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>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/timekeeping.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index d27c756..c1a178c 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -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);
+}
OpenPOWER on IntegriCloud