summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChen Pei <cp0613@linux.alibaba.com>2026-09-28 15:18:45 +0800
committerAlexei Starovoitov <ast@kernel.org>2026-10-11 13:36:43 +0000
commiteec2444d9b9d8cd2bf5e7f54d830325c9b2a1c7d (patch)
tree0f7a7999484d4ec70048c3ebfbfb27f93815936a /tools
parent6ce75af4f59eb7065859cba7f6a563dfb1b7ab75 (diff)
selftests/bpf: Enable instruction array test for riscv64
As the riscv64 JIT now supports instruction array (gotox jump tables), enable the corresponding bpf selftest for riscv64. The guard is 64-bit only because the RV32 JIT does not implement gotox. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260928071845.2432-5-cp0613@linux.alibaba.com
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c b/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
index bfedeed24ac5..4ffe4fe6b78e 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
@@ -4,7 +4,8 @@
#include <bpf/btf.h>
#include <test_progs.h>
-#if defined(__x86_64__) || defined(__powerpc__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__powerpc__) || defined(__aarch64__) || \
+ (defined(__riscv) && __riscv_xlen == 64)
static int map_create(__u32 map_type, __u32 max_entries)
{
const char *map_name = "insn_array";