mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 07:54:36 -05:00
selftests/bpf: Enable arena atomics tests for RV64
Enable arena atomics tests for RV64. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Björn Töpel <bjorn@rivosinc.com> Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20250719091730.2660197-11-pulehui@huaweicloud.com
This commit is contained in:
committed by
Daniel Borkmann
parent
fb7cefabae
commit
dc0fe95614
@@ -28,7 +28,8 @@ bool skip_all_tests = true;
|
||||
|
||||
#if defined(ENABLE_ATOMICS_TESTS) && \
|
||||
defined(__BPF_FEATURE_ADDR_SPACE_CAST) && \
|
||||
(defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86))
|
||||
(defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86) || \
|
||||
(defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64))
|
||||
bool skip_lacq_srel_tests __attribute((__section__(".data"))) = false;
|
||||
#else
|
||||
bool skip_lacq_srel_tests = true;
|
||||
@@ -314,7 +315,8 @@ int load_acquire(const void *ctx)
|
||||
{
|
||||
#if defined(ENABLE_ATOMICS_TESTS) && \
|
||||
defined(__BPF_FEATURE_ADDR_SPACE_CAST) && \
|
||||
(defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86))
|
||||
(defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86) || \
|
||||
(defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64))
|
||||
|
||||
#define LOAD_ACQUIRE_ARENA(SIZEOP, SIZE, SRC, DST) \
|
||||
{ asm volatile ( \
|
||||
@@ -365,7 +367,8 @@ int store_release(const void *ctx)
|
||||
{
|
||||
#if defined(ENABLE_ATOMICS_TESTS) && \
|
||||
defined(__BPF_FEATURE_ADDR_SPACE_CAST) && \
|
||||
(defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86))
|
||||
(defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86) || \
|
||||
(defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64))
|
||||
|
||||
#define STORE_RELEASE_ARENA(SIZEOP, DST, VAL) \
|
||||
{ asm volatile ( \
|
||||
|
||||
Reference in New Issue
Block a user