diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2019-07-11 17:29:30 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-12 16:38:23 +0300 |
commit | af3c24e0e2ed25177b03b60ada9117bb596e8d95 (patch) | |
tree | 107c2c1c08514f8bd3a69ea96223d6408a4443d6 /tools/testing/selftests/bpf/progs/loop2.c | |
parent | 7cd04535abc95c50ba9bfa48efc76274b63c70f5 (diff) | |
download | linux-af3c24e0e2ed25177b03b60ada9117bb596e8d95.tar.xz |
selftests/bpf: fix compiling loop{1, 2, 3}.c on s390
Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Tested-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/loop2.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/loop2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/loop2.c b/tools/testing/selftests/bpf/progs/loop2.c index 0637bd8e8bcf..9b2f808a2863 100644 --- a/tools/testing/selftests/bpf/progs/loop2.c +++ b/tools/testing/selftests/bpf/progs/loop2.c @@ -16,7 +16,7 @@ int while_true(volatile struct pt_regs* ctx) int i = 0; while (true) { - if (ctx->rax & 1) + if (PT_REGS_RC(ctx) & 1) i += 3; else i += 7; |