summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2023-08-27 17:28:00 +0200
committerAlexei Starovoitov <ast@kernel.org>2023-09-08 17:42:18 +0200
commited5285a1482f81f031183286e98edfe76fd9ac3b (patch)
treebd467ced12fb8d6091703294fda4b5342ff08023 /tools/lib
parentselftests/bpf: Update error message in negative linked_list test (diff)
downloadlinux-ed5285a1482f81f031183286e98edfe76fd9ac3b.tar.xz
linux-ed5285a1482f81f031183286e98edfe76fd9ac3b.zip
libbpf: Add __percpu_kptr macro definition
Add __percpu_kptr macro definition in bpf_helpers.h. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230827152800.1998492-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/bpf_helpers.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index bbab9ad9dc5a..77ceea575dc7 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -181,6 +181,7 @@ enum libbpf_tristate {
#define __ksym __attribute__((section(".ksyms")))
#define __kptr_untrusted __attribute__((btf_type_tag("kptr_untrusted")))
#define __kptr __attribute__((btf_type_tag("kptr")))
+#define __percpu_kptr __attribute__((btf_type_tag("percpu_kptr")))
#define bpf_ksym_exists(sym) ({ \
_Static_assert(!__builtin_constant_p(!!sym), #sym " should be marked as __weak"); \