summaryrefslogtreecommitdiffstats
path: root/samples/bpf/tracex1_kern.c
diff options
context:
space:
mode:
authorMichael Holzheu2015-07-06 16:20:07 +0200
committerDavid S. Miller2015-07-09 00:17:45 +0200
commitd912557b346099584bbbfa8d3c1e101c46e33b59 (patch)
tree2752bc31be26f1c27776a0d52439efdd81f9eed7 /samples/bpf/tracex1_kern.c
parentnet: macb: Add SG support for Zynq SOC family (diff)
downloadkernel-qcow2-linux-d912557b346099584bbbfa8d3c1e101c46e33b59.tar.gz
kernel-qcow2-linux-d912557b346099584bbbfa8d3c1e101c46e33b59.tar.xz
kernel-qcow2-linux-d912557b346099584bbbfa8d3c1e101c46e33b59.zip
samples: bpf: enable trace samples for s390x
The trace bpf samples do not compile on s390x because they use x86 specific fields from the "pt_regs" structure. Fix this and access the fields via new PT_REGS macros. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/tracex1_kern.c')
-rw-r--r--samples/bpf/tracex1_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/tracex1_kern.c b/samples/bpf/tracex1_kern.c
index 31620463701a..3f450a8fa1f3 100644
--- a/samples/bpf/tracex1_kern.c
+++ b/samples/bpf/tracex1_kern.c
@@ -29,7 +29,7 @@ int bpf_prog1(struct pt_regs *ctx)
int len;
/* non-portable! works for the given kernel only */
- skb = (struct sk_buff *) ctx->di;
+ skb = (struct sk_buff *) PT_REGS_PARM1(ctx);
dev = _(skb->dev);