aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/bpf_helpers.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h
index 3a44d3a272af..af44e564d6dd 100644
--- a/samples/bpf/bpf_helpers.h
+++ b/samples/bpf/bpf_helpers.h
@@ -86,5 +86,17 @@ static int (*bpf_l4_csum_replace)(void *ctx, int off, int from, int to, int flag
86#define PT_REGS_RC(x) ((x)->gprs[2]) 86#define PT_REGS_RC(x) ((x)->gprs[2])
87#define PT_REGS_SP(x) ((x)->gprs[15]) 87#define PT_REGS_SP(x) ((x)->gprs[15])
88 88
89#elif defined(__aarch64__)
90
91#define PT_REGS_PARM1(x) ((x)->regs[0])
92#define PT_REGS_PARM2(x) ((x)->regs[1])
93#define PT_REGS_PARM3(x) ((x)->regs[2])
94#define PT_REGS_PARM4(x) ((x)->regs[3])
95#define PT_REGS_PARM5(x) ((x)->regs[4])
96#define PT_REGS_RET(x) ((x)->regs[30])
97#define PT_REGS_FP(x) ((x)->regs[29]) /* Works only with CONFIG_FRAME_POINTER */
98#define PT_REGS_RC(x) ((x)->regs[0])
99#define PT_REGS_SP(x) ((x)->sp)
100
89#endif 101#endif
90#endif 102#endif