time: Make do_timer() and xtime_lock local to kernel/time/
[profile/ivi/kernel-x86-ivi.git] / kernel / time / jiffies.c
index 5404a84..b2fa506 100644 (file)
 ************************************************************************/
 #include <linux/clocksource.h>
 #include <linux/jiffies.h>
+#include <linux/module.h>
 #include <linux/init.h>
 
+#include "tick-internal.h"
+
 /* The Jiffies based clocksource is the lowest common
  * denominator clock source which should function on
  * all systems. It has the same coarse resolution as
@@ -64,6 +67,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);