aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorTorben Hohn <torbenh@gmx.de>2011-01-27 09:59:00 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-31 08:55:42 -0500
commitfbad1ea94159a71bc0f68b00e57ae803606af9fb (patch)
treebcd350cc5faa6d3607d2c279d66fa58e96c53425 /kernel/time
parent871cf1e5f2a17702f58539a3af8b18fc8666ad4c (diff)
time: Move get_jiffies_64 to kernel/time/jiffies.c
Move the jiffies access functions to the jiffies clocksource code. [ tglx: Add missing include ] 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: <20110127145900.23248.73352.stgit@localhost> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/jiffies.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 5404a8456909..2fbc20744797 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -22,6 +22,7 @@
22************************************************************************/ 22************************************************************************/
23#include <linux/clocksource.h> 23#include <linux/clocksource.h>
24#include <linux/jiffies.h> 24#include <linux/jiffies.h>
25#include <linux/module.h>
25#include <linux/init.h> 26#include <linux/init.h>
26 27
27/* The Jiffies based clocksource is the lowest common 28/* The Jiffies based clocksource is the lowest common
@@ -64,6 +65,23 @@ struct clocksource clocksource_jiffies = {
64 .shift = JIFFIES_SHIFT, 65 .shift = JIFFIES_SHIFT,
65}; 66};
66 67
68#if (BITS_PER_LONG < 64)
69u64 get_jiffies_64(void)
70{
71 unsigned long seq;
72 u64 ret;
73
74 do {
75 seq = read_seqbegin(&xtime_lock);
76 ret = jiffies_64;
77 } while (read_seqretry(&xtime_lock, seq));
78 return ret;
79}
80EXPORT_SYMBOL(get_jiffies_64);
81#endif
82
83EXPORT_SYMBOL(jiffies);
84
67static int __init init_jiffies_clocksource(void) 85static int __init init_jiffies_clocksource(void)
68{ 86{
69 return clocksource_register(&clocksource_jiffies); 87 return clocksource_register(&clocksource_jiffies);