Your message dated Thu, 03 Nov 2016 10:22:07 +0000
with message-id <e1c2f9r-0003ww...@fasolo.debian.org>
and subject line Bug#773205: fixed in libatomic-ops 7.4.4-2
has caused the Debian Bug report #773205,
regarding libatomic-ops-dev: FTBFS on mips64el
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
773205: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773205
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libatomic-ops-dev
Version: 7.4.2-1
Severity: important
Tags: upstream patch

Hi,

libatomic-ops FTBFS on mips64el due to the testsuite hanging. The code
in the mips specific header assumes that sizeof(AO_t) == 4, which isn't
the case on mips64el which is 64-bits.

I've attached a patch to fix this. Instead of using the 32-bit LL and SC
instructions, it uses the 64-bit LLD and SCD instructions when compiled
on mips64.

Thanks,
James

From 80e8ad2494db151fa35843a2908ff7f11d278ce0 Mon Sep 17 00:00:00 2001
From: James Cowgill <james...@cowgill.org.uk>
Date: Mon, 15 Dec 2014 14:42:15 +0000
Subject: [PATCH] Use LLD / SCD instructions on mips64

---
 src/atomic_ops/sysdeps/gcc/mips.h | 54 ++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 24 deletions(-)

diff --git a/src/atomic_ops/sysdeps/gcc/mips.h b/src/atomic_ops/sysdeps/gcc/mips.h
index a891de6..83a6bd3 100644
--- a/src/atomic_ops/sysdeps/gcc/mips.h
+++ b/src/atomic_ops/sysdeps/gcc/mips.h
@@ -15,7 +15,6 @@
  * FIXME:  This should probably make finer distinctions.  SGI MIPS is
  * much more strongly ordered, and in fact closer to sequentially
  * consistent.  This is really aimed at modern embedded implementations.
- * It looks to me like this assumes a 32-bit ABI.  -HB
  */
 
 #include "../all_aligned_atomic_load_store.h"
@@ -27,14 +26,24 @@
 /* Data dependence does not imply read ordering.  */
 #define AO_NO_DD_ORDERING
 
+#ifdef __mips64
+# define AO_MIPS_SET_ISA    "       .set mips3\n"
+# define AO_MIPS_LL_1(args) "       lld " args "\n"
+# define AO_MIPS_SC(args)   "       scd " args "\n"
+#else
+# define AO_MIPS_SET_ISA    "       .set mips2\n"
+# define AO_MIPS_LL_1(args) "       ll " args "\n"
+# define AO_MIPS_SC(args)   "       sc " args "\n"
+# define AO_T_IS_INT
+#endif
+
 #ifdef AO_ICE9A1_LLSC_WAR
   /* ICE9 rev A1 chip (used in very few systems) is reported to */
   /* have a low-frequency bug that causes LL to fail.           */
   /* To workaround, just issue the second 'LL'.                 */
-# define AO_MIPS_LL_FIX(args_str) \
-      "       ll   " args_str "\n"
+# define AO_MIPS_LL(args) AO_MIPS_LL_1(args) AO_MIPS_LL_1(args)
 #else
-# define AO_MIPS_LL_FIX(args_str) ""
+# define AO_MIPS_LL(args) AO_MIPS_LL_1(args)
 #endif
 
 AO_INLINE void
@@ -42,7 +51,7 @@ AO_nop_full(void)
 {
   __asm__ __volatile__(
       "       .set push           \n"
-      "       .set mips2          \n"
+      AO_MIPS_SET_ISA
       "       .set noreorder      \n"
       "       .set nomacro        \n"
       "       sync                \n"
@@ -60,13 +69,13 @@ AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
 
   __asm__ __volatile__(
       "       .set push\n"
-      "       .set mips2\n"
+      AO_MIPS_SET_ISA
       "       .set noreorder\n"
       "       .set nomacro\n"
-      "1:     ll   %0, %2\n"
-      AO_MIPS_LL_FIX("%0, %2")
+      "1: "
+      AO_MIPS_LL("%0, %2")
       "       addu %1, %0, %3\n"
-      "       sc   %1, %2\n"
+      AO_MIPS_SC("%1, %2")
       "       beqz %1, 1b\n"
       "       nop\n"
       "       .set pop "
@@ -85,13 +94,13 @@ AO_test_and_set(volatile AO_TS_t *addr)
 
   __asm__ __volatile__(
       "       .set push\n"
-      "       .set mips2\n"
+      AO_MIPS_SET_ISA
       "       .set noreorder\n"
       "       .set nomacro\n"
-      "1:     ll   %0, %2\n"
-      AO_MIPS_LL_FIX("%0, %2")
+      "1: "
+      AO_MIPS_LL("%0, %2")
       "       move %1, %3\n"
-      "       sc   %1, %2\n"
+      AO_MIPS_SC("%1, %2")
       "       beqz %1, 1b\n"
       "       nop\n"
       "       .set pop "
@@ -114,14 +123,14 @@ AO_test_and_set(volatile AO_TS_t *addr)
 
     __asm__ __volatile__(
         "       .set push           \n"
-        "       .set mips2          \n"
+        AO_MIPS_SET_ISA
         "       .set noreorder      \n"
         "       .set nomacro        \n"
-        "1:     ll      %0, %1      \n"
-        AO_MIPS_LL_FIX("%0, %1")
+        "1: "
+        AO_MIPS_LL("%0, %1")
         "       bne     %0, %4, 2f  \n"
         "        move   %0, %3      \n"
-        "       sc      %0, %1      \n"
+        AO_MIPS_SC("%0, %1")
         "       .set pop            \n"
         "       beqz    %0, 1b      \n"
         "       li      %2, 1       \n"
@@ -142,14 +151,14 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
 
   __asm__ __volatile__(
       "       .set push\n"
-      "       .set mips2\n"
+      AO_MIPS_SET_ISA
       "       .set noreorder\n"
       "       .set nomacro\n"
-      "1:     ll   %0, %2\n"
-      AO_MIPS_LL_FIX("%0, %2")
+      "1: "
+      AO_MIPS_LL("%0, %2")
       "       bne  %0, %4, 2f\n"
       "       move %1, %3\n"
-      "       sc   %1, %2\n"
+      AO_MIPS_SC("%1, %2")
       "       beqz %1, 1b\n"
       "       nop\n"
       "       .set pop\n"
@@ -167,6 +176,3 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
 /* CAS primitives with acquire, release and full semantics are  */
 /* generated automatically (and AO_int_... primitives are       */
 /* defined properly after the first generalization pass).       */
-
-/* FIXME: 32-bit ABI is assumed.    */
-#define AO_T_IS_INT
-- 
2.1.3


--- End Message ---
--- Begin Message ---
Source: libatomic-ops
Source-Version: 7.4.4-2

We believe that the bug you reported is fixed in the latest version of
libatomic-ops, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 773...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ian Wienand <i...@debian.org> (supplier of updated libatomic-ops package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 03 Nov 2016 20:25:29 +1100
Source: libatomic-ops
Binary: libatomic-ops-dev
Architecture: source amd64
Version: 7.4.4-2
Distribution: unstable
Urgency: medium
Maintainer: Ian Wienand <i...@debian.org>
Changed-By: Ian Wienand <i...@debian.org>
Description:
 libatomic-ops-dev - A library for atomic operations (development files)
Closes: 773205
Changes:
 libatomic-ops (7.4.4-2) unstable; urgency=medium
 .
   * Restore missing MIPS patches from 7.4 branch (Closes: #773205)
   * Re-add from 7.4 branch 0002-Use-LLD-and-SCD-instructions-on-mips64.patch
     (0ff076ab581d83fba6a6f14c3c550c789699678c)
   * Re-add from 7.4 branch 0003-Support-n32-ABI-for-mips64.patch
     (9c92c7b0d7f6c41199583497c5b5cf4eb1105a30)
Checksums-Sha1:
 0feda7e70ca374f02a598322b681688b588e29d9 1783 libatomic-ops_7.4.4-2.dsc
 50f68cdb3af6c73fd22c27eb290d601728e9f8c6 14063 libatomic-ops_7.4.4-2.diff.gz
 7776387a47eafd9731d6873c524af17e6ab3c210 82424 
libatomic-ops-dev_7.4.4-2_amd64.deb
Checksums-Sha256:
 c99f2f2ead53e7dbeea9066ff44821798f909fbc60218e808b60b3b1878a90cb 1783 
libatomic-ops_7.4.4-2.dsc
 f9afa6271251de137e8ccd04a6dfce94255a8f3dd0e587ff93c12a94374e09f8 14063 
libatomic-ops_7.4.4-2.diff.gz
 86753672ee805cd269ddffbd20a2a99a30ca003515b35b17849a29c573b7b6a7 82424 
libatomic-ops-dev_7.4.4-2_amd64.deb
Files:
 4d1e253c4f80a2fad87ac11f8b0feab0 1783 libdevel optional 
libatomic-ops_7.4.4-2.dsc
 b983cc74ac74497209f8053ca9369337 14063 libdevel optional 
libatomic-ops_7.4.4-2.diff.gz
 ed091a70957d07f17131bcd72dac6cd4 82424 libdevel optional 
libatomic-ops-dev_7.4.4-2_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJYGwlvAAoJELam+4uWFa7IbhgP/0yxEVVUXNuXRWhFG5z5qn23
r6wpsWpg3euOEqluNLuwvrFg3SAREWESq/DPNbl+K57m4z8AtvVxmm7kyG885txt
5wKw+fhaDA1FerQdUuuWYP8UrHp8unaAOoZCHgKySjSJmjfo9VKmqIQkmLs/zvf9
8zgMwK9a9lqv4pqN+yK0vvJzxYOCrzqymuu5b2hUorXN1lZdTrqDcG2I4ynb85mS
QmSAcO4HJoq1R1L2gdd4oAarUgaaoDW2tF+J2owLtyYLiJ8fEv6439yNOfJnHIUF
hYWuWIj3/54nDk+RmtIJeY9m3CBLv+ZKaZbWeNR5+98fmZLeIzFQvCYmnq21ZEgr
5ovB2WV5eMaZvle/pCjTMdN6A0RoXp14FHWfp/+mwqXl+fcFUI1TrVZvQvw920LA
1MufVUaRRQUPuwPwcf1frQw+3Q/DAev1YgMokq6b/icGE9f0xsm/ijTR5D+bwxp5
vxAcO8qGoXZOH0UyEx7BnQuBofExNVZlWyMz4u0OoAyp5iYYZURv1WII88aGOxEL
vvhKR1q2aKzVSeCJPjTHufnUGHSg5dcv13T1a7klPia8kJnZ729zArYUITmIsBlu
sfyIqIgrpRI8s0H7EEi/+5fp9NKnDMiil8kGG6ieJlE2Y+9sqXpoeFqp1YnK43lR
ILbipWlJ3gVliKtmy7kC
=oOXY
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to