Skip to content

Commit 7866fc6

Browse files
nak3anakryiko
authored andcommitted
libbpf: Fix comment about arc and riscv arch in bpf_tracing.h
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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent fedf992 commit 7866fc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/lib/bpf/bpf_tracing.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ struct pt_regs___arm64 {
351351
* https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#risc-v-calling-conventions
352352
*/
353353

354+
/* riscv provides struct user_regs_struct instead of struct pt_regs to userspace */
354355
#define __PT_REGS_CAST(x) ((const struct user_regs_struct *)(x))
355356
#define __PT_PARM1_REG a0
356357
#define __PT_PARM2_REG a1
@@ -383,7 +384,7 @@ struct pt_regs___arm64 {
383384
* https://raw.githubusercontent.com/wiki/foss-for-synopsys-dwc-arc-processors/toolchain/files/ARCv2_ABI.pdf
384385
*/
385386

386-
/* arc provides struct user_pt_regs instead of struct pt_regs to userspace */
387+
/* arc provides struct user_regs_struct instead of struct pt_regs to userspace */
387388
#define __PT_REGS_CAST(x) ((const struct user_regs_struct *)(x))
388389
#define __PT_PARM1_REG scratch.r0
389390
#define __PT_PARM2_REG scratch.r1

0 commit comments

Comments
 (0)