summaryrefslogtreecommitdiff
path: root/tools/lib
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2022-07-06 17:02:04 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2022-07-07 17:30:04 +0300
commit935dc35c75318fa213d26808ad8bb130fb0b486e (patch)
treea08d93b255d31697a42625aa794cf10c322fc221 /tools/lib
parent7c8121af1bfe29feedfa4fcb3154886660ecbe3a (diff)
downloadlinux-935dc35c75318fa213d26808ad8bb130fb0b486e.tar.xz
libbpf, riscv: Use a0 for RC register
According to the RISC-V calling convention register usage here [0], a0 is used as return value register, so rename it to make it consistent with the spec. [0] section 18.2, table 18.2 https://riscv.org/wp-content/uploads/2015/01/riscv-calling.pdf Fixes: 589fed479ba1 ("riscv, libbpf: Add RISC-V (RV64) support to bpf_tracing.h") Signed-off-by: Yixun Lan <dlan@gentoo.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Björn Töpel <bjorn@kernel.org> Acked-by: Amjad OULED-AMEUR <ouledameur.amjad@gmail.com> Link: https://lore.kernel.org/bpf/20220706140204.47926-1-dlan@gentoo.org
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/bpf_tracing.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index 01ce121c302d..11f9096407fc 100644
--- a/tools/lib/bpf/bpf_tracing.h
+++ b/tools/lib/bpf/bpf_tracing.h
@@ -233,7 +233,7 @@ struct pt_regs___arm64 {
#define __PT_PARM5_REG a4
#define __PT_RET_REG ra
#define __PT_FP_REG s0
-#define __PT_RC_REG a5
+#define __PT_RC_REG a0
#define __PT_SP_REG sp
#define __PT_IP_REG pc
/* riscv does not select ARCH_HAS_SYSCALL_WRAPPER. */