[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110215152009.GC2866@osiris.boeblingen.de.ibm.com>
Date: Tue, 15 Feb 2011 16:20:09 +0100
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Jason Baron <jbaron@...hat.com>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
hpa@...or.com, mingo@...e.hu, tglx@...utronix.de,
andi@...stfloor.org, roland@...hat.com, rth@...hat.com,
masami.hiramatsu.pt@...achi.com, fweisbec@...il.com,
avi@...hat.com, davem@...emloft.net, sam@...nborg.org,
ddaney@...iumnetworks.com, michael@...erman.id.au,
linux-kernel@...r.kernel.org, Mike Frysinger <vapier@...too.org>,
Chris Metcalf <cmetcalf@...era.com>,
dhowells <dhowells@...hat.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
benh <benh@...nel.crashing.org>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists