Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
--- /dev/null
+#ifndef __BACKPORT_LINUX_KTIME_H
+#define __BACKPORT_LINUX_KTIME_H
+#include_next <linux/ktime.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
+#define ktime_get_raw LINUX_BACKPORT(ktime_get_raw)
+extern ktime_t ktime_get_raw(void);
+
+#endif /* < 3.17 */
+
+#endif /* __BACKPORT_LINUX_KTIME_H */
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/export.h>
+#include <linux/ktime.h>
int bit_wait(void *word)
{
}
EXPORT_SYMBOL_GPL(bit_wait_io);
+/**
+ * ktime_get_raw - Returns the raw monotonic time in ktime_t format
+ */
+ktime_t ktime_get_raw(void)
+{
+ struct timespec ts;
+
+ getrawmonotonic(&ts);
+ return timespec_to_ktime(ts);
+}
+EXPORT_SYMBOL_GPL(ktime_get_raw);