]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
libbpf: Fix comment about arc and riscv arch in bpf_tracing.h
authorKenjiro Nakayama <nakayamakenjiro@gmail.com>
Thu, 4 May 2023 03:54:43 +0000 (12:54 +0900)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 5 May 2023 00:11:04 +0000 (17:11 -0700)
To make comments about arc and riscv arch in bpf_tracing.h accurate,
this patch fixes the comment about arc and adds the comment for riscv.

Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230504035443.427927-1-nakayamakenjiro@gmail.com
tools/lib/bpf/bpf_tracing.h

index 6fb3d0f9af17e3d3f2b1b5a9b55bcf8096c74156..be076a4041ab1c68a595c052b3959d95f6019610 100644 (file)
@@ -351,6 +351,7 @@ struct pt_regs___arm64 {
  * https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#risc-v-calling-conventions
  */
 
+/* riscv provides struct user_regs_struct instead of struct pt_regs to userspace */
 #define __PT_REGS_CAST(x) ((const struct user_regs_struct *)(x))
 #define __PT_PARM1_REG a0
 #define __PT_PARM2_REG a1
@@ -383,7 +384,7 @@ struct pt_regs___arm64 {
  * 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 */
+/* arc provides struct user_regs_struct instead of struct pt_regs to userspace */
 #define __PT_REGS_CAST(x) ((const struct user_regs_struct *)(x))
 #define __PT_PARM1_REG scratch.r0
 #define __PT_PARM2_REG scratch.r1