Accepting request 335424 from OFED:Factory
1 OBS-URL: https://build.opensuse.org/request/show/335424 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dapl?expand=0&rev=4
This commit is contained in:
parent
53dfc28efc
commit
b6d1b3ac69
56
dapl-add-aarch64-platform-support.patch
Normal file
56
dapl-add-aarch64-platform-support.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 142fa8fa58d5e0b92dccc52d7a3bd913456084b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mark Salter <msalter@redhat.com>
|
||||||
|
Date: Wed, 13 May 2015 16:40:58 -0700
|
||||||
|
Subject: [PATCH] dapl: aarch64 support for linux
|
||||||
|
|
||||||
|
Add atomic ops to fix builds for aarch64 Linux.
|
||||||
|
|
||||||
|
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||||
|
Acked-by: Arlin Davis <arlin.r.davis@intel.com>
|
||||||
|
---
|
||||||
|
dapl/udapl/linux/dapl_osd.h | 11 ++++++++++-
|
||||||
|
1 files changed, 10 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
Index: dapl-2.0.42/dapl/udapl/linux/dapl_osd.h
|
||||||
|
===================================================================
|
||||||
|
--- dapl-2.0.42.orig/dapl/udapl/linux/dapl_osd.h
|
||||||
|
+++ dapl-2.0.42/dapl/udapl/linux/dapl_osd.h
|
||||||
|
@@ -51,7 +51,8 @@
|
||||||
|
|
||||||
|
#if !defined(__i386__) && !defined(__ia64__) \
|
||||||
|
&& !defined(__x86_64__) && !defined(__PPC__) && !defined(__PPC64__) \
|
||||||
|
-&& !defined(__s390x__) && !defined(__s390__)
|
||||||
|
+&& !defined(__s390x__) && !defined(__s390__) \
|
||||||
|
+&& !defined(__aarch64__)
|
||||||
|
#error UNDEFINED ARCH
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -213,6 +214,8 @@ dapl_os_atomic_inc (
|
||||||
|
: "=&r" (tmp), "+m" (v)
|
||||||
|
: "b" (v)
|
||||||
|
: "cc");
|
||||||
|
+#elif defined(__aarch64__)
|
||||||
|
+ __atomic_fetch_add(v, 1, __ATOMIC_ACQ_REL);
|
||||||
|
#else /* !__ia64__ */
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"lock;" "incl %0"
|
||||||
|
@@ -257,6 +260,8 @@ dapl_os_atomic_dec (
|
||||||
|
: "=&r" (tmp), "+m" (v)
|
||||||
|
: "b" (v)
|
||||||
|
: "cc");
|
||||||
|
+#elif defined(__aarch64__)
|
||||||
|
+ __atomic_fetch_add(v, -1, __ATOMIC_ACQ_REL);
|
||||||
|
#else /* !__ia64__ */
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"lock;" "decl %0"
|
||||||
|
@@ -321,6 +326,10 @@ dapl_os_atomic_assign (
|
||||||
|
: "=&r" (current_value), "=m" (*v)
|
||||||
|
: "r" (v), "r" (match_value), "r" (new_value), "m" (*v)
|
||||||
|
: "cc", "memory");
|
||||||
|
+#elif defined(__aarch64__)
|
||||||
|
+ current_value = match_value;
|
||||||
|
+ __atomic_compare_exchange_n(v, ¤t_value, new_value, 1,
|
||||||
|
+ __ATOMIC_ACQ_REL, __ATOMIC_RELAXED);
|
||||||
|
#else
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"lock; cmpxchgl %1, %2"
|
126
dapl-add-s390x-platform-support.patch
Normal file
126
dapl-add-s390x-platform-support.patch
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
dapl/udapl/linux/dapl_osd.h | 37 +++++++++++++++++++++++++++++-
|
||||||
|
test/dapltest/mdep/linux/dapl_mdep_user.c | 2 -
|
||||||
|
test/dapltest/mdep/linux/dapl_mdep_user.h | 9 ++++++-
|
||||||
|
3 files changed, 45 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
Index: dapl-2.0.42/dapl/udapl/linux/dapl_osd.h
|
||||||
|
===================================================================
|
||||||
|
--- dapl-2.0.42.orig/dapl/udapl/linux/dapl_osd.h 2014-04-07 19:27:35.000000000 +0200
|
||||||
|
+++ dapl-2.0.42/dapl/udapl/linux/dapl_osd.h 2015-08-11 11:21:10.335431479 +0200
|
||||||
|
@@ -49,7 +49,9 @@
|
||||||
|
#error UNDEFINED OS TYPE
|
||||||
|
#endif /* __linux__ */
|
||||||
|
|
||||||
|
-#if !defined (__i386__) && !defined (__ia64__) && !defined(__x86_64__) && !defined(__PPC__) && !defined(__PPC64__)
|
||||||
|
+#if !defined(__i386__) && !defined(__ia64__) \
|
||||||
|
+&& !defined(__x86_64__) && !defined(__PPC__) && !defined(__PPC64__) \
|
||||||
|
+&& !defined(__s390x__) && !defined(__s390__)
|
||||||
|
#error UNDEFINED ARCH
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -156,6 +158,22 @@ int dapl_os_get_env_val (
|
||||||
|
|
||||||
|
|
||||||
|
/* atomic functions */
|
||||||
|
+#if defined(__s390x__) || defined(__s390__)
|
||||||
|
+#define DAPL_CS_ADD(ptr, op_val) ({ \
|
||||||
|
+ int old_val, new_val; \
|
||||||
|
+ __asm__ __volatile__( \
|
||||||
|
+ " l %0,%2\n" \
|
||||||
|
+ "0: lr %1,%0\n" \
|
||||||
|
+ " ar %1,%3\n" \
|
||||||
|
+ " cs %0,%1,%2\n" \
|
||||||
|
+ " jl 0b" \
|
||||||
|
+ : "=&d" (old_val), "=&d" (new_val), \
|
||||||
|
+ "=Q" (*ptr) \
|
||||||
|
+ : "d" (op_val), "Q" (*ptr) \
|
||||||
|
+ : "cc", "memory"); \
|
||||||
|
+ new_val; \
|
||||||
|
+})
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* dapl_os_atomic_inc
|
||||||
|
*
|
||||||
|
@@ -179,6 +197,11 @@ dapl_os_atomic_inc (
|
||||||
|
#else
|
||||||
|
IA64_FETCHADD(old_value,v,1,4);
|
||||||
|
#endif
|
||||||
|
+#elif defined(__s390x__) || defined(__s390__)
|
||||||
|
+ DAT_COUNT tmp;
|
||||||
|
+ DAT_COUNT delta = 1;
|
||||||
|
+
|
||||||
|
+ tmp = DAPL_CS_ADD(v, delta);
|
||||||
|
#elif defined(__PPC__) || defined(__PPC64__)
|
||||||
|
int tmp;
|
||||||
|
|
||||||
|
@@ -218,6 +241,11 @@ dapl_os_atomic_dec (
|
||||||
|
#else
|
||||||
|
IA64_FETCHADD(old_value,v,-1,4);
|
||||||
|
#endif
|
||||||
|
+#elif defined(__s390x__) || defined(__s390__)
|
||||||
|
+ DAT_COUNT tmp;
|
||||||
|
+ DAT_COUNT delta = -1;
|
||||||
|
+
|
||||||
|
+ tmp = DAPL_CS_ADD(v, delta);
|
||||||
|
#elif defined (__PPC__) || defined(__PPC64__)
|
||||||
|
int tmp;
|
||||||
|
|
||||||
|
@@ -273,6 +301,13 @@ dapl_os_atomic_assign (
|
||||||
|
#else
|
||||||
|
current_value = ia64_cmpxchg(acq,v,match_value,new_value,4);
|
||||||
|
#endif /* __ia64__ */
|
||||||
|
+#elif defined(__s390x__) || defined(__s390__)
|
||||||
|
+ __asm__ __volatile__(
|
||||||
|
+ " cs %0,%2,%1\n"
|
||||||
|
+ : "+d" (match_value), "=Q" (*v)
|
||||||
|
+ : "d" (new_value), "Q" (*v)
|
||||||
|
+ : "cc", "memory");
|
||||||
|
+ current_value = match_value;
|
||||||
|
#elif defined(__PPC__) || defined(__PPC64__)
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
" lwsync\n\
|
||||||
|
Index: dapl-2.0.42/test/dapltest/mdep/linux/dapl_mdep_user.c
|
||||||
|
===================================================================
|
||||||
|
--- dapl-2.0.42.orig/test/dapltest/mdep/linux/dapl_mdep_user.c 2014-04-07 19:27:35.000000000 +0200
|
||||||
|
+++ dapl-2.0.42/test/dapltest/mdep/linux/dapl_mdep_user.c 2015-08-11 11:18:51.751655179 +0200
|
||||||
|
@@ -168,7 +168,7 @@ unsigned long DT_Mdep_GetTime(void)
|
||||||
|
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef RDTSC_TIMERS
|
||||||
|
+#if defined(RDTSC_TIMERS) && !defined(__s390x__)
|
||||||
|
double DT_Mdep_GetCpuMhz(void)
|
||||||
|
{
|
||||||
|
#define DT_TSC_BUFFER_SIZE 128
|
||||||
|
Index: dapl-2.0.42/test/dapltest/mdep/linux/dapl_mdep_user.h
|
||||||
|
===================================================================
|
||||||
|
--- dapl-2.0.42.orig/test/dapltest/mdep/linux/dapl_mdep_user.h 2014-04-07 19:27:35.000000000 +0200
|
||||||
|
+++ dapl-2.0.42/test/dapltest/mdep/linux/dapl_mdep_user.h 2015-08-11 11:18:51.751655179 +0200
|
||||||
|
@@ -143,11 +143,18 @@ DT_Mdep_GetTimeStamp ( void )
|
||||||
|
asm volatile("rdtsc" : "=a" (__a), "=d" (__d));
|
||||||
|
return ((unsigned long)__a) | (((unsigned long)__d)<<32);
|
||||||
|
#else
|
||||||
|
+#if defined(__s390x__)
|
||||||
|
+ DT_Mdep_TimeStamp x;
|
||||||
|
+
|
||||||
|
+ asm volatile("stck %0" : "=Q" (x) : : "cc");
|
||||||
|
+ return x >> 2;
|
||||||
|
+#else
|
||||||
|
#error "Linux CPU architecture - unimplemented"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
#else /* !RDTSC_TIMERS */
|
||||||
|
/*
|
||||||
|
@@ -172,7 +179,7 @@ DT_Mdep_GetTimeStamp ( void )
|
||||||
|
* world. E.g. %llx for gcc, %I64x for Windows
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#if defined(__x86_64__) || defined(__ia64__)
|
||||||
|
+#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__)
|
||||||
|
#define F64d "%ld"
|
||||||
|
#define F64u "%lu"
|
||||||
|
#define F64x "%lx"
|
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 10 08:04:16 UTC 2015 - dmueller@suse.com
|
||||||
|
|
||||||
|
- add dapl-add-aarch64-platform-support.patch (fate#318444)
|
||||||
|
- revert last change
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 25 12:26:58 CEST 2015 - pth@suse.de
|
||||||
|
|
||||||
|
- Exclude aarch64 as there is currently no assembler code for this
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 11 11:04:01 CEST 2015 - pth@suse.de
|
||||||
|
|
||||||
|
- Replace dapl-s390_support.patch with
|
||||||
|
dapl-add-s390x-platform-support.patch (bsc#934683).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 4 14:33:06 UTC 2015 - dimstar@opensuse.org
|
Wed Feb 4 14:33:06 UTC 2015 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -30,9 +30,10 @@ Patch4: dapl-fix_type_punning.patch
|
|||||||
Patch5: dapl-define_NULL.patch
|
Patch5: dapl-define_NULL.patch
|
||||||
Patch6: dapl-man_page_fixes.patch
|
Patch6: dapl-man_page_fixes.patch
|
||||||
Patch7: dapl-fsf_address.patch
|
Patch7: dapl-fsf_address.patch
|
||||||
Patch8: dapl-s390_support.patch
|
Patch8: dapl-add-s390x-platform-support.patch
|
||||||
Patch9: dapl-autotools.patch
|
Patch9: dapl-autotools.patch
|
||||||
Patch10: dapl-rename_dtest.patch
|
Patch10: dapl-rename_dtest.patch
|
||||||
|
Patch11: dapl-add-aarch64-platform-support.patch
|
||||||
Url: http://www.openfabrics.org
|
Url: http://www.openfabrics.org
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -141,6 +142,7 @@ Useful test suites to validate the uDAPL library APIs.
|
|||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9
|
%patch9
|
||||||
%patch10
|
%patch10
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mv man/dtest.1 man/dpltest.1
|
mv man/dtest.1 man/dpltest.1
|
||||||
|
@ -1,102 +0,0 @@
|
|||||||
Cc: alexey_ishchuk@ru.ibm.com
|
|
||||||
Subject: DAPL support for Linux on System z
|
|
||||||
|
|
||||||
s390: Add support for Linux on System z
|
|
||||||
|
|
||||||
This patch adds the required code to support Linux on System z.
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
dapl/udapl/linux/dapl_osd.h | 35 ++++++++++++++++++++++++++++++++++-
|
|
||||||
dat/common/dat_strerror.c | 4 ++++
|
|
||||||
2 files changed, 38 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: dapl-2.0.39/dapl/udapl/linux/dapl_osd.h
|
|
||||||
===================================================================
|
|
||||||
--- dapl-2.0.39.orig/dapl/udapl/linux/dapl_osd.h 2013-10-02 00:42:16.000000000 +0200
|
|
||||||
+++ dapl-2.0.39/dapl/udapl/linux/dapl_osd.h 2014-01-21 18:07:26.226177293 +0100
|
|
||||||
@@ -49,7 +49,7 @@
|
|
||||||
#error UNDEFINED OS TYPE
|
|
||||||
#endif /* __linux__ */
|
|
||||||
|
|
||||||
-#if !defined (__i386__) && !defined (__ia64__) && !defined(__x86_64__) && !defined(__PPC__) && !defined(__PPC64__)
|
|
||||||
+#if !defined (__i386__) && !defined (__ia64__) && !defined(__x86_64__) && !defined(__PPC__) && !defined(__PPC64__) && !defined(__s390x__)
|
|
||||||
#error UNDEFINED ARCH
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -156,6 +156,22 @@ int dapl_os_get_env_val (
|
|
||||||
|
|
||||||
|
|
||||||
/* atomic functions */
|
|
||||||
+#ifdef __s390x__
|
|
||||||
+#define DAPL_CS_ADD(ptr, op_val) ({ \
|
|
||||||
+ int old_val, new_val; \
|
|
||||||
+ __asm__ __volatile__( \
|
|
||||||
+ " l %0,%2\n" \
|
|
||||||
+ "0: lr %1,%0\n" \
|
|
||||||
+ " ar %1,%3\n" \
|
|
||||||
+ " cs %0,%1,%2\n" \
|
|
||||||
+ " jl 0b" \
|
|
||||||
+ : "=&d" (old_val), "=&d" (new_val), \
|
|
||||||
+ "=Q" (*ptr) \
|
|
||||||
+ : "d" (op_val), "Q" (*ptr) \
|
|
||||||
+ : "cc", "memory"); \
|
|
||||||
+ new_val; \
|
|
||||||
+})
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* dapl_os_atomic_inc
|
|
||||||
*
|
|
||||||
@@ -179,6 +195,11 @@ dapl_os_atomic_inc (
|
|
||||||
#else
|
|
||||||
IA64_FETCHADD(old_value,v,1,4);
|
|
||||||
#endif
|
|
||||||
+#elif defined(__s390x__)
|
|
||||||
+ DAT_COUNT tmp;
|
|
||||||
+ DAT_COUNT delta = 1;
|
|
||||||
+
|
|
||||||
+ tmp = DAPL_CS_ADD(v, delta);
|
|
||||||
#elif defined(__PPC__) || defined(__PPC64__)
|
|
||||||
int tmp;
|
|
||||||
|
|
||||||
@@ -218,6 +239,11 @@ dapl_os_atomic_dec (
|
|
||||||
#else
|
|
||||||
IA64_FETCHADD(old_value,v,-1,4);
|
|
||||||
#endif
|
|
||||||
+#elif defined(__s390x__)
|
|
||||||
+ DAT_COUNT tmp;
|
|
||||||
+ DAT_COUNT delta = -1;
|
|
||||||
+
|
|
||||||
+ tmp = DAPL_CS_ADD(v, delta);
|
|
||||||
#elif defined (__PPC__) || defined(__PPC64__)
|
|
||||||
int tmp;
|
|
||||||
|
|
||||||
@@ -273,6 +299,13 @@ dapl_os_atomic_assign (
|
|
||||||
#else
|
|
||||||
current_value = ia64_cmpxchg(acq,v,match_value,new_value,4);
|
|
||||||
#endif /* __ia64__ */
|
|
||||||
+#elif defined(__s390x__)
|
|
||||||
+ __asm__ __volatile__(
|
|
||||||
+ " cs %0,%2,%1\n"
|
|
||||||
+ : "+d" (match_value), "=Q" (*v)
|
|
||||||
+ : "d" (new_value), "Q" (*v)
|
|
||||||
+ : "cc", "memory");
|
|
||||||
+ current_value = match_value;
|
|
||||||
#elif defined(__PPC__) || defined(__PPC64__)
|
|
||||||
__asm__ __volatile__ (
|
|
||||||
" lwsync\n\
|
|
||||||
Index: dapl-2.0.39/dat/common/dat_strerror.c
|
|
||||||
===================================================================
|
|
||||||
--- dapl-2.0.39.orig/dat/common/dat_strerror.c 2014-01-21 18:07:26.206177756 +0100
|
|
||||||
+++ dapl-2.0.39/dat/common/dat_strerror.c 2014-01-21 18:07:26.226177293 +0100
|
|
||||||
@@ -47,6 +47,10 @@
|
|
||||||
#include <dat2/udat.h>
|
|
||||||
#endif /* __UDAPL__ */
|
|
||||||
|
|
||||||
+#ifndef NULL
|
|
||||||
+#define NULL ((void *) 0)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/*********************************************************************
|
|
||||||
* *
|
|
||||||
* Internal Function Declarations *
|
|
18
dapl.changes
18
dapl.changes
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 10 08:04:16 UTC 2015 - dmueller@suse.com
|
||||||
|
|
||||||
|
- add dapl-add-aarch64-platform-support.patch (fate#318444)
|
||||||
|
- revert last change
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 25 12:26:58 CEST 2015 - pth@suse.de
|
||||||
|
|
||||||
|
- Exclude aarch64 as there is currently no assembler code for this
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 11 11:04:01 CEST 2015 - pth@suse.de
|
||||||
|
|
||||||
|
- Replace dapl-s390_support.patch with
|
||||||
|
dapl-add-s390x-platform-support.patch (bsc#934683).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 4 14:33:06 UTC 2015 - dimstar@opensuse.org
|
Wed Feb 4 14:33:06 UTC 2015 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -30,9 +30,10 @@ Patch4: dapl-fix_type_punning.patch
|
|||||||
Patch5: dapl-define_NULL.patch
|
Patch5: dapl-define_NULL.patch
|
||||||
Patch6: dapl-man_page_fixes.patch
|
Patch6: dapl-man_page_fixes.patch
|
||||||
Patch7: dapl-fsf_address.patch
|
Patch7: dapl-fsf_address.patch
|
||||||
Patch8: dapl-s390_support.patch
|
Patch8: dapl-add-s390x-platform-support.patch
|
||||||
Patch9: dapl-autotools.patch
|
Patch9: dapl-autotools.patch
|
||||||
Patch10: dapl-rename_dtest.patch
|
Patch10: dapl-rename_dtest.patch
|
||||||
|
Patch11: dapl-add-aarch64-platform-support.patch
|
||||||
Url: http://www.openfabrics.org
|
Url: http://www.openfabrics.org
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -141,6 +142,7 @@ Useful test suites to validate the uDAPL library APIs.
|
|||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9
|
%patch9
|
||||||
%patch10
|
%patch10
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mv man/dtest.1 man/dpltest.1
|
mv man/dtest.1 man/dpltest.1
|
||||||
|
Loading…
Reference in New Issue
Block a user