Skip to content

Commit

Permalink
libbpf: Complete LoongArch (loongarch) spec in bpf_tracing.h
Browse files Browse the repository at this point in the history
Add PARM6 through PARM8 definitions. Add kernel docs link describing ABI
for LoongArch.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230120200914.3008030-10-andrii@kernel.org
  • Loading branch information
Andrii Nakryiko authored and Daniel Borkmann committed Jan 23, 2023
1 parent 0ac0865 commit 55ff00d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/lib/bpf/bpf_tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,19 @@ struct pt_regs___arm64 {

#elif defined(bpf_target_loongarch)

/* https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html */
/*
* https://docs.kernel.org/loongarch/introduction.html
* https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
*/

#define __PT_PARM1_REG regs[4]
#define __PT_PARM2_REG regs[5]
#define __PT_PARM3_REG regs[6]
#define __PT_PARM4_REG regs[7]
#define __PT_PARM5_REG regs[8]
#define __PT_PARM6_REG regs[9]
#define __PT_PARM7_REG regs[10]
#define __PT_PARM8_REG regs[11]
#define __PT_RET_REG regs[1]
#define __PT_FP_REG regs[22]
#define __PT_RC_REG regs[4]
Expand Down

0 comments on commit 55ff00d

Please sign in to comment.