Accepting request 222089 from home:k0da:ppc
- Drop incorrect ppc64le patch - Force AO_load() to map to AO_load_acquire() for powerpc - added patches: * libatomic_ops-ppc64.patch - removed patches: * libatomic_ops-ppc64le.patch OBS-URL: https://build.opensuse.org/request/show/222089 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libatomic_ops?expand=0&rev=10
This commit is contained in:
parent
ef1f8cee39
commit
0971fe1063
21
libatomic_ops-ppc64.patch
Normal file
21
libatomic_ops-ppc64.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Force AO_load() to map to AO_load_acquire() for powerpc. The
|
||||||
|
AO_load_acquire() function includes isync instructions that
|
||||||
|
are critical for proper behavior on power system.
|
||||||
|
|
||||||
|
|
||||||
|
Signed-Off-By: Will Schmidt <will_schmidt at vnet.ibm.com>
|
||||||
|
|
||||||
|
|
||||||
|
Index: libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/powerpc.h
|
||||||
|
===================================================================
|
||||||
|
--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/gcc/powerpc.h
|
||||||
|
+++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/powerpc.h
|
||||||
|
@@ -32,6 +32,8 @@
|
||||||
|
|
||||||
|
#include "../all_aligned_atomic_load_store.h"
|
||||||
|
|
||||||
|
+#define AO_load(addr) AO_load_acquire(addr)
|
||||||
|
+
|
||||||
|
#include "../test_and_set_t_is_ao_t.h"
|
||||||
|
/* There seems to be no byte equivalent of lwarx, so this */
|
||||||
|
/* may really be what we want, at least in the 32-bit case. */
|
@ -1,65 +0,0 @@
|
|||||||
From: Dinar Valeev <dvaleev@suse.com>
|
|
||||||
Date: 2013-12-03 00:56:33.586516619 +0100
|
|
||||||
|
|
||||||
Index: libatomic_ops-7.2/src/atomic_ops.h
|
|
||||||
===================================================================
|
|
||||||
--- libatomic_ops-7.2.orig/src/atomic_ops.h
|
|
||||||
+++ libatomic_ops-7.2/src/atomic_ops.h
|
|
||||||
@@ -241,7 +241,7 @@
|
|
||||||
# include "atomic_ops/sysdeps/gcc/m68k.h"
|
|
||||||
# endif /* __m68k__ */
|
|
||||||
# if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
|
|
||||||
- || defined(__powerpc64__) || defined(__ppc64__)
|
|
||||||
+ || defined(__powerpc64__) ||defined(__powerpc64le__) || defined(__ppc64__)
|
|
||||||
# include "atomic_ops/sysdeps/gcc/powerpc.h"
|
|
||||||
# endif /* __powerpc__ */
|
|
||||||
# if defined(__aarch64__)
|
|
||||||
Index: libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/powerpc.h
|
|
||||||
===================================================================
|
|
||||||
--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/gcc/powerpc.h
|
|
||||||
+++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/powerpc.h
|
|
||||||
@@ -71,7 +71,7 @@ AO_INLINE AO_t
|
|
||||||
AO_load_acquire(const volatile AO_t *addr)
|
|
||||||
{
|
|
||||||
AO_t result;
|
|
||||||
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
+#if defined(__powerpc64__) || defined(__powerpc64le__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
__asm__ __volatile__ (
|
|
||||||
"ld%U1%X1 %0,%1\n"
|
|
||||||
"cmpw %0,%0\n"
|
|
||||||
@@ -110,7 +110,7 @@ AO_store_release(volatile AO_t *addr, AO
|
|
||||||
/* only cost us a load immediate instruction. */
|
|
||||||
AO_INLINE AO_TS_VAL_t
|
|
||||||
AO_test_and_set(volatile AO_TS_t *addr) {
|
|
||||||
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
+#if defined(__powerpc64__) || defined(__powerpc64le__)|| defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
/* Completely untested. And we should be using smaller objects anyway. */
|
|
||||||
unsigned long oldval;
|
|
||||||
unsigned long temp = 1; /* locked value */
|
|
||||||
@@ -173,7 +173,7 @@ AO_INLINE int
|
|
||||||
AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
|
|
||||||
AO_t oldval;
|
|
||||||
int result = 0;
|
|
||||||
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
+#if defined(__powerpc64__) || defined(__powerpc64le__)|| defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
/* FIXME: Completely untested. */
|
|
||||||
__asm__ __volatile__(
|
|
||||||
"1:ldarx %0,0,%2\n" /* load and reserve */
|
|
||||||
@@ -232,7 +232,7 @@ AO_INLINE AO_t
|
|
||||||
AO_fetch_and_add(volatile AO_t *addr, AO_t incr) {
|
|
||||||
AO_t oldval;
|
|
||||||
AO_t newval;
|
|
||||||
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
+#if defined(__powerpc64__) || defined(__powerpc64le__)|| defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
/* FIXME: Completely untested. */
|
|
||||||
__asm__ __volatile__(
|
|
||||||
"1:ldarx %0,0,%2\n" /* load and reserve */
|
|
||||||
@@ -281,7 +281,7 @@ AO_fetch_and_add_full(volatile AO_t *add
|
|
||||||
}
|
|
||||||
#define AO_HAVE_fetch_and_add_full
|
|
||||||
|
|
||||||
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
+#if defined(__powerpc64__) || defined(__powerpc64le__) || defined(__ppc64__) || defined(__64BIT__)
|
|
||||||
#else
|
|
||||||
# include "../ao_t_is_int.h"
|
|
||||||
#endif
|
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 10 18:39:57 UTC 2014 - dvaleev@suse.com
|
||||||
|
|
||||||
|
- Drop incorrect ppc64le patch
|
||||||
|
- Force AO_load() to map to AO_load_acquire() for powerpc
|
||||||
|
|
||||||
|
- added patches:
|
||||||
|
* libatomic_ops-ppc64.patch
|
||||||
|
- removed patches:
|
||||||
|
* libatomic_ops-ppc64le.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 2 21:00:35 UTC 2013 - dvaleev@suse.com
|
Mon Dec 2 21:00:35 UTC 2013 - dvaleev@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libatomic_ops
|
# spec file for package libatomic_ops
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -26,7 +26,7 @@ Url: http://www.hpl.hp.com/research/linux/atomic_ops/
|
|||||||
|
|
||||||
Source: http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-%version.tar.gz
|
Source: http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-%version.tar.gz
|
||||||
Patch1: libatomic_ops-aarch64.patch
|
Patch1: libatomic_ops-aarch64.patch
|
||||||
Patch2: libatomic_ops-ppc64le.patch
|
Patch2: libatomic_ops-ppc64.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -54,7 +54,8 @@ that involves minimum overhead across a variety of architectures.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %name-7.2
|
%setup -qn %name-7.2
|
||||||
%patch -P 1 -P 2 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
Loading…
Reference in New Issue
Block a user