diff options
| author | 2022-04-10 18:12:46 +0800 | |
|---|---|---|
| committer | 2022-04-11 16:54:54 +0200 | |
| commit | dd642ccb45ecce1402eb2550f5284fc6bb9ed7b8 (patch) | |
| tree | 0e0e04c29e4a88ddfb3ef93d2e736a00adb41ba1 /tools/testing/selftests/bpf/prog_tests/bpf_iter.c | |
| parent | Merge branch 'bpf: RLIMIT_MEMLOCK cleanups' (diff) | |
| download | linux-dev-dd642ccb45ecce1402eb2550f5284fc6bb9ed7b8.tar.xz linux-dev-dd642ccb45ecce1402eb2550f5284fc6bb9ed7b8.zip | |
riscv, bpf: Implement more atomic operations for RV64
This patch implement more BPF atomic operations for RV64. The newly
added operations are shown below:
atomic[64]_[fetch_]add
atomic[64]_[fetch_]and
atomic[64]_[fetch_]or
atomic[64]_xchg
atomic[64]_cmpxchg
Since riscv specification does not provide AMO instruction for CAS
operation, we use lr/sc instruction for cmpxchg operation, and AMO
instructions for the rest ops.
Tests "test_bpf.ko" and "test_progs -t atomic" have passed, as well
as "test_verifier" with no new failure cases.
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/bpf/20220410101246.232875-1-pulehui@huawei.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/bpf_iter.c')
0 files changed, 0 insertions, 0 deletions
