Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1385562
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}() |
| Date | 2016-04-23 04:40 +0200 |
| Message-ID | <rqVEe-3Uw-11@gated-at.bofh.it> (permalink) |
| References | <rqFSN-8hs-3@gated-at.bofh.it> <rqG2y-8lR-73@gated-at.bofh.it> <rqMhA-4Vk-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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!
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}() Peter Zijlstra <peterz@infradead.org> - 2016-04-22 12:00 +0200
Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}() Boqun Feng <boqun.feng@gmail.com> - 2016-04-22 18:40 +0200
Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}() Peter Zijlstra <peterz@infradead.org> - 2016-04-23 04:40 +0200
csiph-web