diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-01-20 12:09:12 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-01-23 20:53:01 +0100 |
commit | 12a299f0b5c746c244bd06fe6a2b3672e9036e83 (patch) | |
tree | dc1e1669b4b18b37b955ee37f320963c69d69d9a | |
parent | 2cf802737fb9cbc258ec65b15c06bd226881ae88 (diff) | |
download | linux-12a299f0b5c746c244bd06fe6a2b3672e9036e83.tar.gz |
libbpf: Define loongarch syscall regs spec in bpf_tracing.h
Define explicit table of registers used for syscall argument passing.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230120200914.3008030-24-andrii@kernel.org
-rw-r--r-- | tools/lib/bpf/bpf_tracing.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h index 87fd2c774e73..b37d3c78b19a 100644 --- a/tools/lib/bpf/bpf_tracing.h +++ b/tools/lib/bpf/bpf_tracing.h @@ -423,13 +423,21 @@ struct pt_regs___arm64 { #define __PT_PARM6_REG regs[9] #define __PT_PARM7_REG regs[10] #define __PT_PARM8_REG regs[11] + +/* loongarch does not select ARCH_HAS_SYSCALL_WRAPPER. */ +#define PT_REGS_SYSCALL_REGS(ctx) ctx +#define __PT_PARM1_SYSCALL_REG __PT_PARM1_REG +#define __PT_PARM2_SYSCALL_REG __PT_PARM2_REG +#define __PT_PARM3_SYSCALL_REG __PT_PARM3_REG +#define __PT_PARM4_SYSCALL_REG __PT_PARM4_REG +#define __PT_PARM5_SYSCALL_REG __PT_PARM5_REG +#define __PT_PARM6_SYSCALL_REG __PT_PARM6_REG + #define __PT_RET_REG regs[1] #define __PT_FP_REG regs[22] #define __PT_RC_REG regs[4] #define __PT_SP_REG regs[3] #define __PT_IP_REG csr_era -/* loongarch does not select ARCH_HAS_SYSCALL_WRAPPER. */ -#define PT_REGS_SYSCALL_REGS(ctx) ctx #endif |