summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2024-12-19 19:15:06 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-27 14:02:17 +0100
commit416226eb3f3a3008456903fc3695b0efa8ceafa1 (patch)
tree5cc14af6ac733617801723aa6c8c10c1b283b2cb /tools/testing
parentfcd39809bf673c47a91b7ea1185a4fedd3ac8149 (diff)
downloadlinux-416226eb3f3a3008456903fc3695b0efa8ceafa1.tar.gz
linux-416226eb3f3a3008456903fc3695b0efa8ceafa1.tar.bz2
linux-416226eb3f3a3008456903fc3695b0efa8ceafa1.zip
selftests/bpf: Use asm constraint "m" for LoongArch
commit 29d44cce324dab2bd86c447071a596262e7109b6 upstream. Currently, LoongArch LLVM does not support the constraint "o" and no plan to support it, it only supports the similar constraint "m", so change the constraints from "nor" in the "else" case to arch-specific "nmr" to avoid the build error such as "unexpected asm memory constraint" for LoongArch. Fixes: 630301b0d59d ("selftests/bpf: Add basic USDT selftests") Suggested-by: Weining Lu <luweining@loongson.cn> Suggested-by: Li Chen <chenli@loongson.cn> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Cc: stable@vger.kernel.org Link: https://llvm.org/docs/LangRef.html#supported-constraint-code-list Link: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp#L172 Link: https://lore.kernel.org/bpf/20241219111506.20643-1-yangtiezhu@loongson.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/sdt.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/sdt.h b/tools/testing/selftests/bpf/sdt.h
index ca0162b4dc57..1fcfa5160231 100644
--- a/tools/testing/selftests/bpf/sdt.h
+++ b/tools/testing/selftests/bpf/sdt.h
@@ -102,6 +102,8 @@
# define STAP_SDT_ARG_CONSTRAINT nZr
# elif defined __arm__
# define STAP_SDT_ARG_CONSTRAINT g
+# elif defined __loongarch__
+# define STAP_SDT_ARG_CONSTRAINT nmr
# else
# define STAP_SDT_ARG_CONSTRAINT nor
# endif