diff options
author | David S. Miller <davem@davemloft.net> | 2015-11-01 05:15:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-01 05:15:30 +0100 |
commit | b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3 (patch) | |
tree | 89f4fbab2c6194b32a46eb771c4b158585bf0bb5 /samples/bpf | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klasse... (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sag... (diff) | |
download | linux-b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3.tar.xz linux-b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'samples/bpf')
-rw-r--r-- | samples/bpf/bpf_helpers.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h index b35c21e0b43f..7ad19e1dbaf4 100644 --- a/samples/bpf/bpf_helpers.h +++ b/samples/bpf/bpf_helpers.h @@ -92,5 +92,17 @@ static int (*bpf_l4_csum_replace)(void *ctx, int off, int from, int to, int flag #define PT_REGS_RC(x) ((x)->gprs[2]) #define PT_REGS_SP(x) ((x)->gprs[15]) +#elif defined(__aarch64__) + +#define PT_REGS_PARM1(x) ((x)->regs[0]) +#define PT_REGS_PARM2(x) ((x)->regs[1]) +#define PT_REGS_PARM3(x) ((x)->regs[2]) +#define PT_REGS_PARM4(x) ((x)->regs[3]) +#define PT_REGS_PARM5(x) ((x)->regs[4]) +#define PT_REGS_RET(x) ((x)->regs[30]) +#define PT_REGS_FP(x) ((x)->regs[29]) /* Works only with CONFIG_FRAME_POINTER */ +#define PT_REGS_RC(x) ((x)->regs[0]) +#define PT_REGS_SP(x) ((x)->sp) + #endif #endif |