From: Mark Rutland <mark.rutland@arm.com>
To: linux-kernel@vger.kernel.org
Cc: akiyks@gmail.com, andrea.parri@amarulasolutions.com,
boqun.feng@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk,
luc.maranget@inria.fr, mark.rutland@arm.com, npiggin@gmail.com,
paulmck@linux.vnet.ibm.com, peterz@infradead.org,
stern@rowland.harvard.edu, will.deacon@arm.com
Subject: [PATCH 1/2] tools/memory-model: remove ACCESS_ONCE() from recipes
Date: Thu, 28 Jun 2018 13:33:46 +0100 [thread overview]
Message-ID: <20180628123347.52963-2-mark.rutland@arm.com> (raw)
In-Reply-To: <20180628123347.52963-1-mark.rutland@arm.com>
Since commit:
b899a850431e2dd0 ("compiler.h: Remove ACCESS_ONCE()")
... there has been no definition of ACCESS_ONCE() in the kernel tree,
and it has been necessary to use READ_ONCE() or WRITE_ONCE() instead.
Let's update the exmaples in recipes.txt likewise for consistency, using
READ_ONCE() for reads.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrea Parri <andrea.parri@amarulasolutions.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jade Alglave <j.alglave@ucl.ac.uk>
Cc: Luc Maranget <luc.maranget@inria.fr>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Akira Yokosawa <akiyks@gmail.com>
---
tools/memory-model/Documentation/recipes.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/memory-model/Documentation/recipes.txt b/tools/memory-model/Documentation/recipes.txt
index ee4309a87fc4..1fea8ef2b184 100644
--- a/tools/memory-model/Documentation/recipes.txt
+++ b/tools/memory-model/Documentation/recipes.txt
@@ -322,9 +322,9 @@ the following write-side code fragment:
And the xlog_valid_lsn() function in fs/xfs/xfs_log_priv.h contains
the corresponding read-side code fragment:
- cur_cycle = ACCESS_ONCE(log->l_curr_cycle);
+ cur_cycle = READ_ONCE(log->l_curr_cycle);
smp_rmb();
- cur_block = ACCESS_ONCE(log->l_curr_block);
+ cur_block = READ_ONCE(log->l_curr_block);
Alternatively, consider the following comment in function
perf_output_put_handle() in kernel/events/ring_buffer.c:
--
2.11.0
next prev parent reply other threads:[~2018-06-28 12:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 12:33 [PATCH 0/2] tools/memory-model: remove ACCESS_ONCE() Mark Rutland
2018-06-28 12:33 ` Mark Rutland [this message]
2018-06-28 12:33 ` [PATCH 2/2] tools/memory-model: remove ACCESS_ONCE() from model Mark Rutland
2018-06-28 12:38 ` [PATCH 0/2] tools/memory-model: remove ACCESS_ONCE() Andrea Parri
2018-06-28 15:21 ` Paul E. McKenney
2018-06-28 16:51 ` Andrea Parri
2018-07-02 18:54 ` Paul E. McKenney
2018-07-03 10:12 ` Andrea Parri
2018-07-03 15:53 ` Paul E. McKenney
2018-07-03 17:23 ` Andrea Parri
2018-07-06 14:55 ` Paul E. McKenney
2018-06-28 22:22 ` Akira Yokosawa
2018-06-29 3:05 ` Paul E. McKenney
2018-07-07 0:17 ` LKMM patch scorecard for v4.19 merge window Paul E. McKenney
2018-07-09 18:18 ` Alan Stern
2018-07-09 23:01 ` Paul E. McKenney
2018-07-10 20:05 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180628123347.52963-2-mark.rutland@arm.com \
--to=mark.rutland@arm.com \
--cc=akiyks@gmail.com \
--cc=andrea.parri@amarulasolutions.com \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=j.alglave@ucl.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=npiggin@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).