1 Star 0 Fork 43

zhtianyu/openmpi

forked from src-openEuler/openmpi 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-add-loongarch64-support-for-openmpi.patch 2.04 KB
一键复制 编辑 原始数据 按行查看 历史
From 015d0246d315377d1d8aeadeff8fcbc2aef49874 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Thu, 20 Jul 2023 03:27:39 +0000
Subject: [PATCH] add loongarch64 support for openmpi
---
config/opal_config_asm.m4 | 5 +++++
opal/include/opal/sys/architecture.h | 1 +
opal/include/opal/sys/cma.h | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4
index d8640e0..586a2c8 100644
--- a/config/opal_config_asm.m4
+++ b/config/opal_config_asm.m4
@@ -1154,6 +1154,11 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
OPAL_ASM_SUPPORT_64BIT=1
OPAL_GCC_INLINE_ASSIGN='"li %0, 0" : "=&r"(ret)'
;;
+ loongarch64*)
+ opal_cv_asm_arch="LOONGARCH64"
+ OPAL_ASM_SUPPORT_64BIT=1
+ OPAL_GCC_INLINE_ASSIGN='"li.d %0, 0" : "=&r"(ret)'
+ ;;
# There is no current difference between s390 and s390x
# But use two different defines in case some come later
# as s390 is 31bits while s390x is 64bits
diff --git a/opal/include/opal/sys/architecture.h b/opal/include/opal/sys/architecture.h
index 8a9fc53..ed54270 100644
--- a/opal/include/opal/sys/architecture.h
+++ b/opal/include/opal/sys/architecture.h
@@ -45,6 +45,7 @@
#define OPAL_S390 0110
#define OPAL_S390X 0111
#define OPAL_RISCV64 0120
+#define OPAL_LOONGARCH64 0130
#define OPAL_BUILTIN_SYNC 0200
#define OPAL_BUILTIN_GCC 0202
#define OPAL_BUILTIN_NO 0203
diff --git a/opal/include/opal/sys/cma.h b/opal/include/opal/sys/cma.h
index 8040ccb..11417b5 100644
--- a/opal/include/opal/sys/cma.h
+++ b/opal/include/opal/sys/cma.h
@@ -97,6 +97,11 @@
#define __NR_process_vm_readv 270
#define __NR_process_vm_writev 271
+#elif OPAL_ASSEMBLY_ARCH == OPAL_LOONGARCH64
+/* LOONGARCH64 uses the asm-generic syscall numbers */
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+
#else
#error "Unsupported architecture for process_vm_readv and process_vm_writev syscalls"
#endif
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhtianyu/openmpi.git
git@gitee.com:zhtianyu/openmpi.git
zhtianyu
openmpi
openmpi
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385