summaryrefslogtreecommitdiff
path: root/backport/compat
diff options
context:
space:
mode:
Diffstat (limited to 'backport/compat')
-rw-r--r--backport/compat/Makefile1
-rw-r--r--backport/compat/backport-4.18.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 12c4121f..f5b1886e 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -37,6 +37,7 @@ compat-$(CPTCFG_KERNEL_4_7) += backport-4.7.o
compat-$(CPTCFG_KERNEL_4_8) += backport-4.8.o
compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o
compat-$(CPTCFG_KERNEL_4_12) += backport-4.12.o
+compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o
compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o
diff --git a/backport/compat/backport-4.18.c b/backport/compat/backport-4.18.c
new file mode 100644
index 00000000..c47fabe5
--- /dev/null
+++ b/backport/compat/backport-4.18.c
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2018 Intel Corporation
+ */
+
+#include <linux/hrtimer.h>
+
+time64_t ktime_get_boottime_seconds(void)
+{
+ return ktime_divns(ktime_get_boottime(), NSEC_PER_SEC);
+}
+EXPORT_SYMBOL_GPL(ktime_get_boottime_seconds);