diff options
author | Tiezhu Yang <[email protected]> | 2023-02-24 18:36:53 +0800 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2023-02-27 09:49:19 -0800 |
commit | 29c66ad1c3ad1698becf81182f73fb4bd50bceb2 (patch) | |
tree | 596fa919f1b10c35a423902972cda4f220b80c46 /tools/testing/selftests/bpf/prog_tests/user_ringbuf.c | |
parent | 68bfd65fb98d16239d14719a47cc1582510001de (diff) |
libbpf: Use struct user_pt_regs to define __PT_REGS_CAST() for LoongArch
LoongArch provides struct user_pt_regs instead of struct pt_regs
to userspace, use struct user_pt_regs to define __PT_REGS_CAST()
to fix the following build error:
CLNG-BPF [test_maps] loop1.bpf.o
progs/loop1.c:22:9: error: incomplete definition of type 'struct pt_regs'
m = PT_REGS_RC(ctx);
^~~~~~~~~~~~~~~
tools/testing/selftests/bpf/tools/include/bpf/bpf_tracing.h:493:41: note: expanded from macro 'PT_REGS_RC'
#define PT_REGS_RC(x) (__PT_REGS_CAST(x)->__PT_RC_REG)
~~~~~~~~~~~~~~~~~^
tools/testing/selftests/bpf/tools/include/bpf/bpf_helper_defs.h:20:8: note: forward declaration of 'struct pt_regs'
struct pt_regs;
^
1 error generated.
make: *** [Makefile:572: tools/testing/selftests/bpf/loop1.bpf.o] Error 1
make: Leaving directory 'tools/testing/selftests/bpf'
Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/user_ringbuf.c')
0 files changed, 0 insertions, 0 deletions