public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf mmap: Convert ACCESS_ONCE() to READ_ONCE()
@ 2017-11-14 10:31 Mark Rutland
  2017-11-14 22:08 ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2017-11-14 10:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Rutland, Arnaldo Carvalho de Melo, Ingo Molnar,
	Paul E . McKenney, Peter Zijlstra

Recently there was a treewide conversion of ACCESS_ONCE() to
{READ,WRITE}_ONCE(), but a new use was introduced concurrently by
commit:

  1695849735752d2a ("perf mmap: Move perf_mmap and methods to separate mmap.[ch] files")

Let's convert this over to READ_ONCE() so that we can remove the
ACCESS_ONCE() definitions in subsequent patches.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 tools/perf/util/mmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi,

Would it be possible for this to be taken as a fixup in an upcoming rc? That
way we should be able to remove the ACCESS_ONCE() definitions prior to v4.15.

Thanks,
Mark.

diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
index efd78b827b05..3a5cb5a6e94a 100644
--- a/tools/perf/util/mmap.h
+++ b/tools/perf/util/mmap.h
@@ -70,7 +70,7 @@ void perf_mmap__read_catchup(struct perf_mmap *md);
 static inline u64 perf_mmap__read_head(struct perf_mmap *mm)
 {
 	struct perf_event_mmap_page *pc = mm->base;
-	u64 head = ACCESS_ONCE(pc->data_head);
+	u64 head = READ_ONCE(pc->data_head);
 	rmb();
 	return head;
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-14 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 10:31 [PATCH] perf mmap: Convert ACCESS_ONCE() to READ_ONCE() Mark Rutland
2017-11-14 22:08 ` Paul E. McKenney
2017-11-14 22:21   ` Joe Perches
2017-11-14 22:56     ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox