Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}()
From: Peter Zijlstra
Date: Fri Apr 22 2016 - 22:33:03 EST
- Next message: Zhangjian (Bamvor): "Re: [PATCH 12/25] arm64: compat: change config dependences to aarch32"
- Previous message: Finn Thain: "[PATCH] MAINTAINERS: Update the file list for the NCR 5380 entry"
- In reply to: Boqun Feng: "Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}()"
- Next in thread: Peter Zijlstra: "[RFC][PATCH 17/31] locking,parisc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Apr 23, 2016 at 12:41:57AM +0800, Boqun Feng wrote:
> > +#define ATOMIC_FETCH_OP_RELAXED(op, asm_op) \
> > +static inline int atomic_fetch_##op##_relaxed(int a, atomic_t *v) \
> > +{ \
> > + int res, t; \
> > + \
> > + __asm__ __volatile__( \
> > +"1: lwarx %0,0,%4 # atomic_fetch_" #op "_relaxed\n" \
> > + #asm_op " %1,%2,%0\n" \
>
> Should be
>
> #asm_op " %1,%3,%0\n"
>
> right? Because %2 is v->counter and %3 is @a.
Indeed, thanks!
- Next message: Zhangjian (Bamvor): "Re: [PATCH 12/25] arm64: compat: change config dependences to aarch32"
- Previous message: Finn Thain: "[PATCH] MAINTAINERS: Update the file list for the NCR 5380 entry"
- In reply to: Boqun Feng: "Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}()"
- Next in thread: Peter Zijlstra: "[RFC][PATCH 17/31] locking,parisc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]