summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2024-01-23 15:11:23 -0800
committerAlexei Starovoitov <ast@kernel.org>2024-01-23 15:11:23 -0800
commitc80c6434aaccc689b2c7ff432d43abad8f4217b2 (patch)
treeeabaee12da6ad1bd91e948cab9a6d99f13e5c979
parent20e109ea9842158a153b24ef42ec5cc3d44e9485 (diff)
parent29f868887a7dd3efc6faecc6fc91b28fc25cf5b0 (diff)
Merge branch 'enable-the-inline-of-kptr_xchg-for-arm64'
Hou Tao says: ==================== Enable the inline of kptr_xchg for arm64 From: Hou Tao <houtao1@huawei.com> Hi, The patch set is just a follow-up for "bpf: inline bpf_kptr_xchg()". It enables the inline of bpf_kptr_xchg() and kptr_xchg_inline test for arm64. Please see individual patches for more details. And comments are always welcome. ==================== Link: https://lore.kernel.org/r/20240119102529.99581-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r--arch/arm64/net/bpf_jit_comp.c5
-rw-r--r--tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 8955da5c47cf..cfd5434de483 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -2305,3 +2305,8 @@ out:
return ret;
}
+
+bool bpf_jit_supports_ptr_xchg(void)
+{
+ return true;
+}
diff --git a/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c b/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c
index 5a4bee1cf970..15144943e88b 100644
--- a/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c
+++ b/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c
@@ -13,7 +13,7 @@ void test_kptr_xchg_inline(void)
unsigned int cnt;
int err;
-#if !defined(__x86_64__)
+#if !(defined(__x86_64__) || defined(__aarch64__))
test__skip();
return;
#endif