Mark Rutland
332efa6374
locking/atomics, EDAC/altera: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE()
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't currently harmful.
However, for some features it is necessary to instrument reads and
writes separately, which is not possible with ACCESS_ONCE(). This
distinction is critical to correct operation.
It's possible to transform the bulk of kernel code using the Coccinelle
script below. However, this doesn't handle comments, leaving references
to ACCESS_ONCE() instances which have been removed. As a preparatory
step, this patch converts the Altera EDAC code and comments to use
{READ,WRITE}_ONCE() consistently.
----
virtual patch
@ depends on patch @
expression E1, E2;
@@
- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)
@ depends on patch @
expression E;
@@
- ACCESS_ONCE(E)
+ READ_ONCE(E)
----
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Thor Thayer <thor.thayer@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-2-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 11:00:56 +02:00
..
2017-10-25 11:00:56 +02:00
2016-09-01 08:55:24 +02:00
2015-02-23 13:08:09 +01:00
2015-02-23 13:08:09 +01:00
2017-07-17 13:42:48 +02:00
2017-02-14 11:58:05 +01:00
2017-07-17 13:42:48 +02:00
2016-12-15 08:54:51 -02:00
2009-04-02 19:05:03 -07:00
2016-12-15 08:54:51 -02:00
2010-11-01 15:38:34 -04:00
2016-12-15 08:54:51 -02:00
2017-07-19 07:42:41 +02:00
2016-02-10 10:37:46 +01:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2016-12-15 08:54:51 -02:00
2016-12-24 11:46:01 -08:00
2016-12-15 08:54:51 -02:00
2017-08-20 13:12:32 +02:00
2017-04-10 17:15:02 +02:00
2017-01-28 14:36:47 +01:00
2016-12-15 08:54:51 -02:00
2016-12-15 08:54:51 -02:00
2016-12-15 08:54:51 -02:00
2016-12-24 11:46:01 -08:00
2016-12-15 08:54:51 -02:00
2017-02-09 17:40:54 +01:00
2016-09-01 10:28:01 +02:00
2017-07-17 13:42:48 +02:00
2016-12-15 08:54:51 -02:00
2017-07-17 13:42:48 +02:00
2017-08-20 13:12:32 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-04-27 14:15:38 +02:00
2016-12-15 08:54:51 -02:00
2017-04-10 17:14:48 +02:00
2017-08-21 17:59:38 +02:00
2017-01-24 09:14:55 +01:00
2017-02-03 10:36:35 +01:00
2016-09-01 10:28:00 +02:00
2017-07-17 13:42:48 +02:00
2011-04-19 00:23:22 +02:00
2016-12-15 08:54:51 -02:00
2016-12-15 08:54:51 -02:00
2016-12-15 08:54:51 -02:00
2016-12-15 08:54:51 -02:00
2016-12-15 08:54:51 -02:00
2017-08-19 10:51:11 +02:00
2017-03-16 12:40:52 +01:00
2017-07-19 07:42:41 +02:00
2009-04-02 19:05:03 -07:00
2017-07-17 13:42:48 +02:00
2017-08-02 05:40:11 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-08-18 19:12:08 +02:00
2016-12-15 08:54:51 -02:00
2016-08-15 07:21:29 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00