Re: [PATCH] powerpc: Implement atomic{,64}_{read,write}() without volatile

2007-08-17 Thread Segher Boessenkool
Instead, use asm() like all other atomic operations already do. +static __inline__ long atomic64_read(const atomic_t *v) +static __inline__ void atomic64_set(atomic_t *v, long i) s/atomic_t/atomic64_t/ in both lines. I've edited my copy of the patch. Ouch, sorry about that. Segher -

Re: [PATCH] powerpc: Implement atomic{,64}_{read,write}() without volatile

2007-08-16 Thread Paul Mackerras
Segher Boessenkool writes: > Instead, use asm() like all other atomic operations already do. > +static __inline__ long atomic64_read(const atomic_t *v) > +static __inline__ void atomic64_set(atomic_t *v, long i) s/atomic_t/atomic64_t/ in both lines. I've edited my copy of the patch. Paul. - T

Re: [PATCH] powerpc: Implement atomic{,64}_{read,write}() without volatile

2007-08-10 Thread Paul Mackerras
Segher Boessenkool writes: > Instead, use asm() like all other atomic operations already do. > > Also use inline functions instead of macros; this actually > improves code generation (some code becomes a little smaller, > probably because of improved alias information -- just a few > hundred byte