This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] mips: work-around R10k ll/sc errata


On Wed, Jun 29, 2011 at 04:19:32PM +0000, Joseph S. Myers wrote:

> > Unfortunately, GCC <= 4.6 is going to be around for a while. The patch
> > is noninvasive and only modifies the code in one very specific (and
> > currently broken) case. Would you mind if it were committed, at least
> > until the __sync_*-based implementation is committed?
> 
> I didn't get any sense of consensus in the previous discussion (which 
> extended to at least Jan 2009) and several people there are rather more 
> expert in the MIPS variants than me.  Perhaps someone would care to put 
> together a compilation of all the points raised and explain how the patch 
> addresses them or at least leaves things no worse off - in particular 
> detailing the circumstances (compiler options) under which the patch 
> results in any change to the code in glibc.

Do you have a pointer to that old discussion?

The patch's use of branch likely is the correct workaround for the LL/SC
issue of R10000 up to v2.6.  The resulting binaries will work on anything
MIPS II and better so this is even suitable for binaries portable for all
MIPS platforms except the LL/SC-less MIPS I processors which are super old
by now.

GCC 4.4 (I think) introduced the -march=r10000 flag.  Users of yet older
GCC always can pass a -D_MIPS_ARCH_R10000.  Most likely they have a newer
GCC anyway because that is required to build a Linux kernel for the most
popular R10000 kernels.

To summarize, I think the patch should be applied but the mentioned issues
may deserve documentation.

As more of a general question, Is there a point in eventually moving this
sort of stuff into a VDSO?  It would allow the kernel to provide suitable
definitions of common LL/SC constructs without having to modify glibc.

  Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]