]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dtrace: fix fbt return probes on RISC-V
authorkp <kp@FreeBSD.org>
Fri, 11 Sep 2020 09:15:49 +0000 (09:15 +0000)
committerkp <kp@FreeBSD.org>
Fri, 11 Sep 2020 09:15:49 +0000 (09:15 +0000)
commitd7cd21d9e695b7ea55fdc08b7fa9e46ad064ae43
tree447f24848870b452893eac872cf2af6a76704039
parent78ab0b67bf7822163a99c62b78bb259f5f314422
dtrace: fix fbt return probes on RISC-V

Return values are passed in a0, so read it from there. We also pass a1 through
to userspace, as the ABI allows small structs to be returned in registers
a0/a1. While here read the register values directly from the trapframe rather
than rtval, and remove the now unneeded argument from dtrace_invop().

Set fbtp_roffset so that we get the correct return location in arg0.

Reviewed by: markj
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D26389
sys/cddl/dev/dtrace/riscv/dtrace_subr.c
sys/cddl/dev/fbt/riscv/fbt_isa.c