time: Move get_jiffies_64 to kernel/time/jiffies.c
authorTorben Hohn <torbenh@gmx.de>
Thu, 27 Jan 2011 14:59:00 +0000 (15:59 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 31 Jan 2011 13:55:42 +0000 (14:55 +0100)
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>
kernel/time.c
kernel/time/jiffies.c

index 32174359576fa075a520de56ab30aacc51af08ef..a31b51220ac691a3d050df3fb4fec91915c211f0 100644 (file)
@@ -674,23 +674,6 @@ unsigned long nsecs_to_jiffies(u64 n)
 #endif
 }
 
-#if (BITS_PER_LONG < 64)
-u64 get_jiffies_64(void)
-{
-       unsigned long seq;
-       u64 ret;
-
-       do {
-               seq = read_seqbegin(&xtime_lock);
-               ret = jiffies_64;
-       } while (read_seqretry(&xtime_lock, seq));
-       return ret;
-}
-EXPORT_SYMBOL(get_jiffies_64);
-#endif
-
-EXPORT_SYMBOL(jiffies);
-
 /*
  * Add two timespec values and do a safety check for overflow.
  * It's assumed that both values are valid (>= 0)
index 5404a84569094f3cef796e903ad6a4cb92a8b3e8..2fbc207447974482259c7c68e2151bc94220f396 100644 (file)
@@ -22,6 +22,7 @@
 ************************************************************************/
 #include <linux/clocksource.h>
 #include <linux/jiffies.h>
+#include <linux/module.h>
 #include <linux/init.h>
 
 /* The Jiffies based clocksource is the lowest common
@@ -64,6 +65,23 @@ struct clocksource clocksource_jiffies = {
        .shift          = JIFFIES_SHIFT,
 };
 
+#if (BITS_PER_LONG < 64)
+u64 get_jiffies_64(void)
+{
+       unsigned long seq;
+       u64 ret;
+
+       do {
+               seq = read_seqbegin(&xtime_lock);
+               ret = jiffies_64;
+       } while (read_seqretry(&xtime_lock, seq));
+       return ret;
+}
+EXPORT_SYMBOL(get_jiffies_64);
+#endif
+
+EXPORT_SYMBOL(jiffies);
+
 static int __init init_jiffies_clocksource(void)
 {
        return clocksource_register(&clocksource_jiffies);