]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/bpf/helpers.c
Merge tag 'amd-drm-fixes-5.6-2020-02-26' of git://people.freedesktop.org/~agd5f/linux...
[linux.git] / kernel / bpf / helpers.c
index cada974c9f4e38efd6b9c11635f87a87042634c3..d8b7b110a1c5e397ffb2af11705a255d80587736 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/uidgid.h>
 #include <linux/filter.h>
 #include <linux/ctype.h>
+#include <linux/jiffies.h>
 
 #include "../../lib/kstrtox.h"
 
@@ -312,6 +313,17 @@ void copy_map_value_locked(struct bpf_map *map, void *dst, void *src,
        preempt_enable();
 }
 
+BPF_CALL_0(bpf_jiffies64)
+{
+       return get_jiffies_64();
+}
+
+const struct bpf_func_proto bpf_jiffies64_proto = {
+       .func           = bpf_jiffies64,
+       .gpl_only       = false,
+       .ret_type       = RET_INTEGER,
+};
+
 #ifdef CONFIG_CGROUPS
 BPF_CALL_0(bpf_get_current_cgroup_id)
 {