On 7/30/20 1:44 PM, Jerry Cruntime wrote:
The o32, n32 and n64 calling conventions require the return value to be stored in $v0 which maps to $2 register, i.e., the second register. Fixes: c1932cd ("bpf: Add MIPS support to samples/bpf.")
Jerry, your patch is missing a Signed-off-by from you. It should be enough if you just reply with one in here that I'll add to the commit message and I'll take it via bpf tree then, thanks.
--- tools/lib/bpf/bpf_tracing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h index 58eceb884..ae205dcf8 100644 --- a/tools/lib/bpf/bpf_tracing.h +++ b/tools/lib/bpf/bpf_tracing.h @@ -215,7 +215,7 @@ struct pt_regs; #define PT_REGS_PARM5(x) ((x)->regs[8]) #define PT_REGS_RET(x) ((x)->regs[31]) #define PT_REGS_FP(x) ((x)->regs[30]) /* Works only with CONFIG_FRAME_POINTER */ -#define PT_REGS_RC(x) ((x)->regs[1]) +#define PT_REGS_RC(x) ((x)->regs[2]) #define PT_REGS_SP(x) ((x)->regs[29]) #define PT_REGS_IP(x) ((x)->cp0_epc) -- 2.17.1