Commit 2803c6ea authored by Sandipan Das's avatar Sandipan Das

Fix helper to access stack pointer for powerpc

This fixes the definition of PT_REGS_SP() for powerpc to refer
to GPR1.

Fixes: #529
       4afa96a7 ("cc: introduce helpers to access pt_regs in an arch-independent manner")
Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
parent 4bfc4346
......@@ -547,7 +547,7 @@ int bpf_usdt_readarg_p(int argc, struct pt_regs *ctx, void *buf, u64 len) asm("l
#define PT_REGS_PARM6(ctx) ((ctx)->gpr[8])
#define PT_REGS_RC(ctx) ((ctx)->gpr[3])
#define PT_REGS_IP(ctx) ((ctx)->nip)
#define PT_REGS_SP(ctx) ((ctx)->sp)
#define PT_REGS_SP(ctx) ((ctx)->gpr[1])
#elif defined(__s390x__)
#define PT_REGS_PARM1(x) ((x)->gprs[2])
#define PT_REGS_PARM2(x) ((x)->gprs[3])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment