Messages in this thread | | | Date | Tue, 15 Feb 2011 16:20:09 +0100 | From | Heiko Carstens <> | Subject | Re: [PATCH 0/2] jump label: 2.6.38 updates |
| |
On Mon, Feb 14, 2011 at 06:27:27PM +0100, Peter Zijlstra wrote: > On Mon, 2011-02-14 at 12:18 -0500, Steven Rostedt wrote: > > > mn10300: > > #define atomic_read(v) ((v)->counter) > > > tile: > > static inline int atomic_read(const atomic_t *v) > > { > > return v->counter; > > } > > Yeah, I already send email to the respective maintainers telling them > they might want to fix this ;-) > > > > So all but a few have basically (as you said on IRC) > > #define atomic_read(v) ACCESS_ONCE(v) > > ACCESS_ONCE(v->counter), but yeah :-) > > > Those few are blackfin, s390, powerpc and tile. > > > > s390 probably doesn't need that much of a big hammer with atomic_read() > > (unless it uses it in its own arch that expects it to be such). > > Right, it could just do the volatile thing..
The reason that the code on s390 looks like it is was that the volatile cast was known to generate really bad code. However I just tried a few variants (inline asm / ACCESS_ONCE / leave as is) with gcc 4.5.2 and the resulting code was always identical. So I'm going to change it to the ACCESS_ONCE variant so it's the same like everywhere else.
| |