This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix the atomic_compare_and_exchange_*_rel definitions.
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, Lei Xu <lei dot xu at nxp dot com>
- Cc: libc-alpha at sourceware dot org, scott dot wood at nxp dot com, carlos at systemhalted dot org, sjmunroe at us dot ibm dot com
- Date: Mon, 13 Jun 2016 09:33:24 -0500
- Subject: Re: [PATCH] Fix the atomic_compare_and_exchange_*_rel definitions.
- Authentication-results: sourceware.org; auth=none
- References: <1465723849-12811-1-git-send-email-lei dot xu at nxp dot com> <87h9cx894b dot fsf at totoro dot br dot ibm dot com>
- Reply-to: munroesj at linux dot vnet dot ibm dot com
On Mon, 2016-06-13 at 11:19 -0300, Tulio Magno Quites Machado Filho
wrote:
> Hi Lei,
>
> Lei Xu <lei.xu@nxp.com> writes:
>
> > In current code, atomic_compare_and_exchange_*_rel is defined as
> > atomic_compare_and_exchange_*_acq, however this is wrong on power arch,
> > especially __arch_*_rel has been defined on power arch.
> > This has caused segmentation fault issue
> > when doing pthread_mutex_lock/unlock operations on PowerPC E6500.
>
> I didn't expect the generic code to affect a PowerPC E6500 build.
> It should be using both of the files:
> sysdeps/powerpc/atomic-machine.h
> sysdeps/powerpc/powerpc32/atomic-machine.h
>
E6500 is a 64-bit part which unfortunately follows the Embedded profile
and so can not blindly use the power* server profile definitions and
overrides.
I suspect he needs a sysdeps/powerpc/powerpc64/e6500/ with overrides and
Implies to pick up common powerpc definitions
> These files define atomic_compare_and_exchange_val_rel(), which should
> prevent from defining the atomic_compare_and_exchange_val_rel() as
> atomic_compare_and_exchange_val_acq() in the generic file.
>
> So, there is a chance your build didn't use these files...
> How are you configuring your glibc build?
>