aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/basics/custom_float.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2023-10-05 17:55:32 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2023-10-11 14:02:54 +0200
commitae7487d112cf9f310d32f27d5956f53d9f143fea (patch)
tree9ffe6aba1af30560034221f66d48a780535bd0a6 /drivers/gpu/drm/amd/display/dc/basics/custom_float.c
parent19fbf677b2530740d71d4fb64ab2de0dbdc31111 (diff)
selftests/hid: ensure we can compile the tests on kernels pre-6.3
For the hid-bpf tests to compile, we need to have the definition of struct hid_bpf_ctx. This definition is an internal one from the kernel and it is supposed to be defined in the generated vmlinux.h. This vmlinux.h header is generated based on the currently running kernel or if the kernel was already compiled in the tree. If you just compile the selftests without compiling the kernel beforehand and you are running on a 6.2 kernel, you'll end up with a vmlinux.h without the hid_bpf_ctx definition. Use the clever trick from tools/testing/selftests/bpf/progs/bpf_iter.h to force the definition of that symbol in case we don't find it in the BTF and also add __attribute__((preserve_access_index)) to further support CO-RE functionality for these tests. Signed-off-by: Justin Stitt <justinstitt@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> # Build Tested-by: Justin Stitt <justinstitt@google.com> Link: https://lore.kernel.org/r/20230825-wip-selftests-v3-1-639963c54109@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics/custom_float.c')
0 files changed, 0 insertions, 0 deletions