summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/bpf_tracing.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2023-01-20 23:08:57 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2023-01-23 22:53:00 +0300
commit0ac086567916e189c7db71da7339e20b5747f8ac (patch)
tree5954cc57096c4610594ea4779bef3e5fd6ad9042 /tools/lib/bpf/bpf_tracing.h
parentb13ed8ca7fba3d3e61621be021fdccd5c44b2634 (diff)
downloadlinux-0ac086567916e189c7db71da7339e20b5747f8ac.tar.xz
libbpf: Fix and complete ARC spec in bpf_tracing.h
Add PARM6 through PARM8 definitions. Also fix frame pointer (FP) register definition. Also leave a link to where to find ABI spec. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20230120200914.3008030-9-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/bpf_tracing.h')
-rw-r--r--tools/lib/bpf/bpf_tracing.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index 579e2f830532..815c50ccedf4 100644
--- a/tools/lib/bpf/bpf_tracing.h
+++ b/tools/lib/bpf/bpf_tracing.h
@@ -291,6 +291,11 @@ struct pt_regs___arm64 {
#elif defined(bpf_target_arc)
+/*
+ * Section "Function Calling Sequence" (page 24):
+ * https://raw.githubusercontent.com/wiki/foss-for-synopsys-dwc-arc-processors/toolchain/files/ARCv2_ABI.pdf
+ */
+
/* arc provides struct user_pt_regs instead of struct pt_regs to userspace */
#define __PT_REGS_CAST(x) ((const struct user_regs_struct *)(x))
#define __PT_PARM1_REG scratch.r0
@@ -298,8 +303,11 @@ struct pt_regs___arm64 {
#define __PT_PARM3_REG scratch.r2
#define __PT_PARM4_REG scratch.r3
#define __PT_PARM5_REG scratch.r4
+#define __PT_PARM6_REG scratch.r5
+#define __PT_PARM7_REG scratch.r6
+#define __PT_PARM8_REG scratch.r7
#define __PT_RET_REG scratch.blink
-#define __PT_FP_REG __unsupported__
+#define __PT_FP_REG scratch.fp
#define __PT_RC_REG scratch.r0
#define __PT_SP_REG scratch.sp
#define __PT_IP_REG scratch.ret