forked from pool/openucx
6c87d0bee6
- Update to v1.3.0 (bsc#1104159) - Added stream-based communication API to UCP - Added support for GPU platforms: Nvidia CUDA and AMD ROCM software stacks - Added API for client/server based connection establishment - Added support for TCP transport - Support for InfiniBand tag-matching offload for DC and accelerated transports - Multi-rail support for eager and rendezvous protocols - Added support for tag-matching communications with CUDA buffers - Added ucp_rkey_ptr() to obtain pointer for shared memory region - Avoid progress overhead on unused transports - Improved scalability of software tag-matching by using a hash table - Added transparent huge-pages allocator - Added non-blocking flush and disconnect for UCP - Support fixed-address memory allocation via ucp_mem_map() - Added ucp_tag_send_nbr() API to avoid send request allocation - Support global addressing in all IB transports - Add support for external epoll fd and edge-triggered events - Added registration cache for knem - Initial support for Java bindings - Multiple bugfixes (full list on github) - Drop UCT-UD-fixed-compilation-by-gcc8.patch as it was fixed upstream - Refresh openucx-s390x-support.patch against latest sources OBS-URL: https://build.opensuse.org/request/show/628372 OBS-URL: https://build.opensuse.org/package/show/science:HPC/openucx?expand=0&rev=21
156 lines
3.8 KiB
Diff
156 lines
3.8 KiB
Diff
commit c4261cb194ce2f87c564c22f5cb795f33fce6f5f
|
|
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
|
Date: Thu Aug 9 07:41:24 2018 +0200
|
|
|
|
openucx s390x support
|
|
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
|
|
|
diff --git src/ucs/Makefile.am src/ucs/Makefile.am
|
|
index 74edce424728..43a50e893f77 100644
|
|
--- src/ucs/Makefile.am
|
|
+++ src/ucs/Makefile.am
|
|
@@ -53,6 +53,8 @@ noinst_HEADERS = \
|
|
arch/generic/cpu.h \
|
|
arch/ppc64/bitops.h \
|
|
arch/ppc64/cpu.h \
|
|
+ arch/s390x/bitops.h \
|
|
+ arch/s390x/cpu.h \
|
|
arch/x86_64/atomic.h \
|
|
arch/x86_64/bitops.h \
|
|
arch/x86_64/cpu.h \
|
|
diff --git src/ucs/arch/atomic.h src/ucs/arch/atomic.h
|
|
index 7649971b407b..7bb2bc36c483 100644
|
|
--- src/ucs/arch/atomic.h
|
|
+++ src/ucs/arch/atomic.h
|
|
@@ -15,6 +15,8 @@
|
|
# include "generic/atomic.h"
|
|
#elif defined(__aarch64__)
|
|
# include "generic/atomic.h"
|
|
+#elif defined(__s390x__)
|
|
+# include "generic/atomic.h"
|
|
#else
|
|
# error "Unsupported architecture"
|
|
#endif
|
|
diff --git src/ucs/arch/bitops.h src/ucs/arch/bitops.h
|
|
index f4dd3ab45964..de53bde0d33f 100644
|
|
--- src/ucs/arch/bitops.h
|
|
+++ src/ucs/arch/bitops.h
|
|
@@ -14,6 +14,8 @@
|
|
# include "ppc64/bitops.h"
|
|
#elif defined(__aarch64__)
|
|
# include "aarch64/bitops.h"
|
|
+#elif defined(__s390x__)
|
|
+# include "s390x/bitops.h"
|
|
#else
|
|
# error "Unsupported architecture"
|
|
#endif
|
|
diff --git src/ucs/arch/cpu.h src/ucs/arch/cpu.h
|
|
index 1c362bc92fba..14172218e24c 100644
|
|
--- src/ucs/arch/cpu.h
|
|
+++ src/ucs/arch/cpu.h
|
|
@@ -56,6 +56,8 @@ typedef enum ucs_cpu_flag {
|
|
# include "ppc64/cpu.h"
|
|
#elif defined(__aarch64__)
|
|
# include "aarch64/cpu.h"
|
|
+#elif defined(__s390x__)
|
|
+# include "s390x/cpu.h"
|
|
#else
|
|
# error "Unsupported architecture"
|
|
#endif
|
|
diff --git src/ucs/arch/s390x/bitops.h src/ucs/arch/s390x/bitops.h
|
|
new file mode 100644
|
|
index 000000000000..39ad125107e9
|
|
--- /dev/null
|
|
+++ src/ucs/arch/s390x/bitops.h
|
|
@@ -0,0 +1,32 @@
|
|
+/**
|
|
+* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED.
|
|
+*
|
|
+* See file LICENSE for terms.
|
|
+*/
|
|
+
|
|
+#ifndef UCS_S390X_BITOPS_H_
|
|
+#define UCS_S390X_BITOPS_H_
|
|
+
|
|
+#include <stdint.h>
|
|
+
|
|
+
|
|
+static inline unsigned __ucs_ilog2_u32(uint32_t n)
|
|
+{
|
|
+ if (!n)
|
|
+ return 0;
|
|
+ return 31 - __builtin_clz(n);
|
|
+}
|
|
+
|
|
+static inline unsigned __ucs_ilog2_u64(uint64_t n)
|
|
+{
|
|
+ if (!n)
|
|
+ return 0;
|
|
+ return 63 - __builtin_clz(n);
|
|
+}
|
|
+
|
|
+static inline unsigned ucs_ffs64(uint64_t n)
|
|
+{
|
|
+ return __ucs_ilog2_u64(n & -n);
|
|
+}
|
|
+
|
|
+#endif
|
|
diff --git src/ucs/arch/s390x/cpu.h src/ucs/arch/s390x/cpu.h
|
|
new file mode 100644
|
|
index 000000000000..f5131ea30a8f
|
|
--- /dev/null
|
|
+++ src/ucs/arch/s390x/cpu.h
|
|
@@ -0,0 +1,51 @@
|
|
+/**
|
|
+* Copyright (C) Mellanox Technologies Ltd. 2001-2013. ALL RIGHTS RESERVED.
|
|
+* Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED.
|
|
+*
|
|
+* See file LICENSE for terms.
|
|
+*/
|
|
+
|
|
+
|
|
+#ifndef UCS_S390X_CPU_H_
|
|
+#define UCS_S390X_CPU_H_
|
|
+
|
|
+#include <ucs/sys/compiler.h>
|
|
+#include <ucs/arch/generic/cpu.h>
|
|
+#include <stdint.h>
|
|
+
|
|
+
|
|
+#define UCS_ARCH_CACHE_LINE_SIZE 256
|
|
+
|
|
+/* Assume the worst - weak memory ordering */
|
|
+#define ucs_memory_bus_fence() asm volatile (""::: "memory")
|
|
+#define ucs_memory_bus_store_fence() ucs_memory_bus_fence()
|
|
+#define ucs_memory_bus_load_fence() ucs_memory_bus_fence()
|
|
+#define ucs_memory_cpu_fence() ucs_memory_bus_fence()
|
|
+#define ucs_memory_cpu_store_fence() ucs_memory_bus_fence()
|
|
+#define ucs_memory_cpu_load_fence() ucs_memory_bus_fence()
|
|
+
|
|
+
|
|
+static inline uint64_t ucs_arch_read_hres_clock()
|
|
+{
|
|
+ unsigned long clk;
|
|
+ asm volatile("stck %0" : "=Q" (clk) : : "cc");
|
|
+ return clk >> 2;
|
|
+}
|
|
+#define ucs_arch_get_clocks_per_sec ucs_arch_generic_get_clocks_per_sec
|
|
+
|
|
+
|
|
+static inline ucs_cpu_model_t ucs_arch_get_cpu_model()
|
|
+{
|
|
+ return UCS_CPU_MODEL_UNKNOWN;
|
|
+}
|
|
+
|
|
+static inline int ucs_arch_get_cpu_flag()
|
|
+{
|
|
+ return UCS_CPU_FLAG_UNKNOWN;
|
|
+}
|
|
+
|
|
+double ucs_arch_get_clocks_per_sec();
|
|
+
|
|
+#define ucs_arch_wait_mem ucs_arch_generic_wait_mem
|
|
+
|
|
+#endif
|