SHA256
1
0
forked from pool/mvapich2
mvapich2/mvapich2-s390_get_cycles.patch
Nicolas Morey-Chaisemartin b95e475e85 Accepting request 502493 from home:NMoreyChaisemartin:branches:science:HPC
- Reenable arm compilation
- Rename and cleanup mvapich-s390_get_cycles.patch to
  mvapich2-s390_get_cycles.patch for coherency
- Cleanup mvapich2-pthread_yield.patch
- Add mvapich2-arm-support.patch to provide missing functions for
  armv7hl and aarch64

OBS-URL: https://build.opensuse.org/request/show/502493
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=6
2017-06-09 07:27:29 +00:00

20 lines
655 B
Diff

diff --git src/mpid/ch3/channels/common/include/mv2_clock.h src/mpid/ch3/channels/common/include/mv2_clock.h
index 7edc148..ac117c2 100644
--- src/mpid/ch3/channels/common/include/mv2_clock.h
+++ src/mpid/ch3/channels/common/include/mv2_clock.h
@@ -82,6 +82,14 @@ static inline cycles_t get_cycles()
return ret;
}
+#elif defined(__s390__) || defined(__s390x__)
+typedef unsigned long cycles_t;
+static inline cycles_t get_cycles()
+{
+ unsigned long clk;
+ asm volatile("stck %0" : "=Q" (clk) : : "cc");
+ return clk >> 2;
+}
#else
#warning get_cycles not implemented for this architecture: attempt asm/timex.h
#include <asm/timex.h>