linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Mark Rutland <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: luc.maranget@inria.fr, will.deacon@arm.com, boqun.feng@gmail.com,
	mark.rutland@arm.com, tglx@linutronix.de, j.alglave@ucl.ac.uk,
	stern@rowland.harvard.edu, dhowells@redhat.com,
	paulmck@linux.vnet.ibm.com, hpa@zytor.com, akiyks@gmail.com,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	andrea.parri@amarulasolutions.com, npiggin@gmail.com,
	peterz@infradead.org, mingo@kernel.org
Subject: [tip:locking/core] tools/memory-model: Remove ACCESS_ONCE() from recipes
Date: Tue, 17 Jul 2018 02:27:53 -0700	[thread overview]
Message-ID: <tip-5bde06b63af2af8c2326270aae041067eef89245@git.kernel.org> (raw)
In-Reply-To: <20180716180605.16115-5-paulmck@linux.vnet.ibm.com>

Commit-ID:  5bde06b63af2af8c2326270aae041067eef89245
Gitweb:     https://git.kernel.org/tip/5bde06b63af2af8c2326270aae041067eef89245
Author:     Mark Rutland <mark.rutland@arm.com>
AuthorDate: Mon, 16 Jul 2018 11:05:56 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 17 Jul 2018 09:29:34 +0200

tools/memory-model: Remove ACCESS_ONCE() from recipes

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>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Cc: Akira Yokosawa <akiyks@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jade Alglave <j.alglave@ucl.ac.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luc Maranget <luc.maranget@inria.fr>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arch@vger.kernel.org
Cc: parri.andrea@gmail.com
Link: http://lkml.kernel.org/r/20180716180605.16115-5-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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:

  reply	other threads:[~2018-07-17  9:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 18:05 [PATCH memory-model 0/14] Updates to the formal memory model Paul E. McKenney
2018-07-16 18:05 ` [PATCH memory-model 01/14] tools/memory-model: Add litmus test for full multicopy atomicity Paul E. McKenney
2018-07-17  9:25   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-07-16 18:05 ` [PATCH memory-model 02/14] tools/memory-model: Fix ISA2+pooncelock+pooncelock+pombonce name Paul E. McKenney
2018-07-17  9:26   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-07-16 18:05 ` [PATCH memory-model 03/14] MAINTAINERS: Add Daniel Lustig as an LKMM reviewer Paul E. McKenney
2018-07-17  9:26   ` [tip:locking/core] " tip-bot for Palmer Dabbelt
2018-07-16 18:05 ` [PATCH memory-model 04/14] locking/memory-barriers.txt/kokr: Update Korean translation to fix broken DMA vs. MMIO ordering example Paul E. McKenney
2018-07-17  9:27   ` [tip:locking/core] " tip-bot for SeongJae Park
2018-07-16 18:05 ` [PATCH memory-model 05/14] tools/memory-model: Remove ACCESS_ONCE() from recipes Paul E. McKenney
2018-07-17  9:27   ` tip-bot for Mark Rutland [this message]
2018-07-16 18:05 ` [PATCH memory-model 06/14] tools/memory-model: Remove ACCESS_ONCE() from model Paul E. McKenney
2018-07-17  9:28   ` [tip:locking/core] " tip-bot for Mark Rutland
2018-07-16 18:05 ` [PATCH memory-model 07/14] tools/memory-model: Make scripts executable Paul E. McKenney
2018-07-17  9:29   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-07-16 18:05 ` [PATCH memory-model 08/14] docs: atomic_ops: Describe atomic_set as a write operation Paul E. McKenney
2018-07-16 18:06 ` [PATCH memory-model 09/14] tools/memory-model: Add informal LKMM documentation to MAINTAINERS Paul E. McKenney
2018-07-17  9:30   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-07-16 18:06 ` [PATCH memory-model 10/14] sched: Use smp_mb() in wake_woken_function() Paul E. McKenney
2018-07-17  9:30   ` [tip:locking/core] sched/core: " tip-bot for Andrea Parri
2018-07-16 18:06 ` [PATCH memory-model 11/14] locking: Clarify requirements for smp_mb__after_spinlock() Paul E. McKenney
2018-07-17  9:31   ` [tip:locking/core] locking/spinlock, sched/core: " tip-bot for Andrea Parri
2018-07-16 18:06 ` [PATCH memory-model 12/14] doc: Update wake_up() & co. memory-barrier guarantees Paul E. McKenney
2018-07-17  9:31   ` [tip:locking/core] sched/Documentation: " tip-bot for Andrea Parri
2018-07-16 18:06 ` [PATCH memory-model 13/14] memory-model/Documentation: Fix typo, smb->smp Paul E. McKenney
2018-07-17  9:32   ` [tip:locking/core] tools/memory-model/Documentation: " tip-bot for Yauheni Kaliuta
2018-07-16 18:06 ` [PATCH memory-model 14/14] tools/memory-model: Rename litmus tests to comply to norm7 Paul E. McKenney
2018-07-17  9:33   ` [tip:locking/core] " tip-bot for Andrea Parri

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=tip-5bde06b63af2af8c2326270aae041067eef89245@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=akiyks@gmail.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=hpa@zytor.com \
    --cc=j.alglave@ucl.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --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).