From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH v2 bpf-next 08/25] libbpf: fix and complete ARC spec in bpf_tracing.h
Date: Fri, 20 Jan 2023 12:08:57 -0800 [thread overview]
Message-ID: <20230120200914.3008030-9-andrii@kernel.org> (raw)
In-Reply-To: <20230120200914.3008030-1-andrii@kernel.org>
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>
---
tools/lib/bpf/bpf_tracing.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
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
--
2.30.2
next prev parent reply other threads:[~2023-01-20 20:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 20:08 [PATCH v2 bpf-next 00/25] libbpf: extend [ku]probe and syscall argument tracing support Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 01/25] libbpf: add support for fetching up to 8 arguments in kprobes Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 02/25] libbpf: add 6th argument support for x86-64 in bpf_tracing.h Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 03/25] libbpf: fix arm and arm64 specs " Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 04/25] libbpf: complete mips spec " Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 05/25] libbpf: complete powerpc " Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 06/25] libbpf: complete sparc " Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 07/25] libbpf: complete riscv arch " Andrii Nakryiko
2023-01-20 20:08 ` Andrii Nakryiko [this message]
2023-01-20 20:08 ` [PATCH v2 bpf-next 09/25] libbpf: complete LoongArch (loongarch) " Andrii Nakryiko
2023-01-20 20:08 ` [PATCH v2 bpf-next 10/25] libbpf: add BPF_UPROBE and BPF_URETPROBE macro aliases Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 11/25] selftests/bpf: validate arch-specific argument registers limits Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 12/25] libbpf: improve syscall tracing support in bpf_tracing.h Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 13/25] libbpf: define x86-64 syscall regs spec " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 14/25] libbpf: define i386 " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 15/25] libbpf: define s390x " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 16/25] libbpf: define arm " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 17/25] libbpf: define arm64 " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 18/25] libbpf: define mips " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 19/25] libbpf: define powerpc " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 20/25] libbpf: define sparc " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 21/25] libbpf: define riscv " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 22/25] libbpf: define arc " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 23/25] libbpf: define loongarch " Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 24/25] selftests/bpf: add 6-argument syscall tracing test Andrii Nakryiko
2023-01-20 20:09 ` [PATCH v2 bpf-next 25/25] libbpf: clean up now not needed __PT_PARM{1-6}_SYSCALL_REG defaults Andrii Nakryiko
2023-01-23 20:10 ` [PATCH v2 bpf-next 00/25] libbpf: extend [ku]probe and syscall argument tracing support patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230120200914.3008030-9-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox