]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add bpf_ktime_get_boot_ns()
authorMaciej Żenczykowski <maze@google.com>
Sun, 26 Apr 2020 16:15:25 +0000 (09:15 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Apr 2020 16:43:05 +0000 (09:43 -0700)
commit202cbb1786b157641de167789e57d745a8fd8a6b
tree424b2ecd19cc56edb46333e2a2773cd062bdaf82
parent1d3f7486b41f8ddd4f01454bf54ae4037e1ecee9
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>
drivers/media/rc/bpf-lirc.c
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/core.c
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c
tools/include/uapi/linux/bpf.h