This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Disable 64-bit atomics for MIPS n32 [committed]
- From: Torvald Riegel <triegel at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Chris Metcalf <cmetcalf at ezchip dot com>, Joseph Myers <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 29 Jan 2015 09:16:35 +0100
- Subject: Re: Disable 64-bit atomics for MIPS n32 [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1501281844510 dot 16983 at digraph dot polyomino dot org dot uk> <1422480679 dot 29655 dot 187 dot camel at triegel dot csb> <54C9593F dot 7040909 at ezchip dot com> <CAMe9rOr4ipJ2rceaYc8U260iwDjcYwoNOLtuygwNOO5zGcKbbw at mail dot gmail dot com>
On Wed, 2015-01-28 at 14:04 -0800, H.J. Lu wrote:
> On Wed, Jan 28, 2015 at 1:48 PM, Chris Metcalf <cmetcalf@ezchip.com> wrote:
> > On 1/28/2015 4:31 PM, Torvald Riegel wrote:
> >>
> >> On Wed, 2015-01-28 at 18:45 +0000, Joseph Myers wrote:
> >>>
> >>> This patch disables use of 64-bit atomics for MIPS n32 to fix the
> >>> problems with unaligned semaphores.
> >>
> >> That works. I would probably preferred to just do this in the semaphore
> >> bits (ie, checking for __HAVE_64B_ATOMICS and _LP64, but both have the
> >> same effect for 2.21.
> >
> >
> > You would then have disabled 64-bit atomics for x32, which may not
> > be the solution preferred by H.J.
> >
>
> I am OK to disable 64-bit atomics in semaphore for x32 in 2.21. We can
> look for a better solution in 2.22. But the name, __HAVE_64B_ATOMICS,
> is very much misleading. How about
>
> __HAVE_64B_ATOMICS_FOR_SEMAPHORE
We could have that *additionally*, but the intent behind
__HAVE_64B_ATOMCIS was to allow archs to express whether they have
HW-supported 64b atomic operations at all, and in such a way that makes
sense for general use (e.g., not just cmpxchg8b or what it's called on
i686).