Re: [PATCH] locking/atomics/powerpc: Move cmpxchg helpers to asm/cmpxchg.h and define the full set of cmpxchg APIs

From: Ingo Molnar
Date: Sun May 06 2018 - 08:11:41 EST



* Boqun Feng <boqun.feng@xxxxxxxxx> wrote:

> > The only change I made beyond a trivial build fix is that I also added the release
> > atomics variants explicitly:
> >
> > +#define atomic_cmpxchg_release(v, o, n) \
> > + cmpxchg_release(&((v)->counter), (o), (n))
> > +#define atomic64_cmpxchg_release(v, o, n) \
> > + cmpxchg_release(&((v)->counter), (o), (n))
> >
> > It has passed a PowerPC cross-build test here, but no runtime tests.
> >
>
> Do you have the commit at any branch in tip tree? I could pull it and
> cross-build and check the assembly code of lib/atomic64_test.c, that way
> I could verify whether we mess something up.
>
> > Does this patch look good to you?
> >
>
> Yep!

Great - I have pushed the commits out into the locking tree, they can be found in:

git fetch git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core

The PowerPC preparatory commit from you is:

0476a632cb3a: locking/atomics/powerpc: Move cmpxchg helpers to asm/cmpxchg.h and define the full set of cmpxchg APIs

Thanks,

Ingo