summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2020-04-26 09:15:25 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-04-26 09:43:05 -0700
commit71d19214776e61b33da48f7c1b46e522c7f78221 (patch)
tree424b2ecd19cc56edb46333e2a2773cd062bdaf82 /drivers/media/rc
parent0a05861f80fe7d4dcfdabcc98d9854947573e072 (diff)
downloadlinux-stable-71d19214776e61b33da48f7c1b46e522c7f78221.tar.gz
linux-stable-71d19214776e61b33da48f7c1b46e522c7f78221.tar.bz2
linux-stable-71d19214776e61b33da48f7c1b46e522c7f78221.zip
bpf: add bpf_ktime_get_boot_ns()
On a device like a cellphone which is constantly suspending and resuming CLOCK_MONOTONIC is not particularly useful for keeping track of or reacting to external network events. Instead you want to use CLOCK_BOOTTIME. Hence add bpf_ktime_get_boot_ns() as a mirror of bpf_ktime_get_ns() based around CLOCK_BOOTTIME instead of CLOCK_MONOTONIC. Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/bpf-lirc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/rc/bpf-lirc.c b/drivers/media/rc/bpf-lirc.c
index 0f3417d161b8..069c42f22a8c 100644
--- a/drivers/media/rc/bpf-lirc.c
+++ b/drivers/media/rc/bpf-lirc.c
@@ -103,6 +103,8 @@ lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
return &bpf_map_peek_elem_proto;
case BPF_FUNC_ktime_get_ns:
return &bpf_ktime_get_ns_proto;
+ case BPF_FUNC_ktime_get_boot_ns:
+ return &bpf_ktime_get_boot_ns_proto;
case BPF_FUNC_tail_call:
return &bpf_tail_call_proto;
case BPF_FUNC_get_prandom_u32: