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
This commit is contained in:
Chen Pei 2026-09-28 15:18:45 +08:00 committed by Alexei Starovoitov
parent 6ce75af4f5
commit eec2444d9b
No known key found for this signature in database

View File

@ -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";