[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0f=WvSQSBQ4t0FmEkcFE_mC3oARxaeTviTSkSa-D2qhg@mail.gmail.com>
Date: Fri, 8 Nov 2019 20:57:14 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Will Deacon <will@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Yunjae Lee <lyj7694@...il.com>,
SeongJae Park <sj38.park@...il.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Josh Triplett <josh@...htriplett.org>,
Matt Turner <mattst88@...il.com>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Richard Henderson <rth@...ddle.net>,
Peter Zijlstra <peterz@...radead.org>,
Alan Stern <stern@...land.harvard.edu>,
Michael Ellerman <mpe@...erman.id.au>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Joe Perches <joe@...ches.com>,
Boqun Feng <boqun.feng@...il.com>,
alpha <linux-alpha@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
Christian Borntraeger <borntraeger@...ibm.com>
Subject: Re: [PATCH 01/13] compiler.h: Split {READ,WRITE}_ONCE definitions out
into rwonce.h
On Fri, Nov 8, 2019 at 6:01 PM Will Deacon <will@...nel.org> wrote:
>
> In preparation for allowing architectures to define their own
> implementation of the 'READ_ONCE()' macro, move the generic
> '{READ,WRITE}_ONCE()' definitions out of the unwieldy 'linux/compiler.h'
> and into a new 'rwonce.h' header under 'asm-generic'.
Adding Christian Bornträger to Cc, he originally added the
READ_ONCE()/WRITE_ONCE()
code.
I wonder if it would be appropriate now to revert back to a much simpler version
of these helpers for any modern compiler. As I understand, only gcc-4.6 and
gcc4.7 actually need the song-and-dance version with the union and switch/case,
while for others, we can might be able back to a macro doing a volatile access.
Arnd
Powered by blists - more mailing lists