Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7752165imm; Thu, 28 Jun 2018 08:49:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ8+J9BdQEFhLJoMJs5hgspUHwYF4g1Z0Rn2C5Dxw2QW0QInVNj4Kx/mNr541ZKD4H+dmBB X-Received: by 2002:a63:3807:: with SMTP id f7-v6mr9330443pga.446.1530200984620; Thu, 28 Jun 2018 08:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530200984; cv=none; d=google.com; s=arc-20160816; b=MWOIv2ahouUYuewGMdsuyY8W/+ISJrBvavQzgExmO73+W5UM2W9vFIrVodpeWtFOLs S5QwlM4qMEQ3ys7nfPGSANuCIcnvMNiVJolakvalN85pwPueXGQOQIkNaFkKhvhR/FIk V2NQlHvlWP6j8PkTGHkPE22YSctlop217jzweItdNx2Vtui1Abl1QSKZcXyRgFh1v7p5 4vWjVYDJWpRKTrfsq7j5p3z4JWJDQbeuccuW60RtfpZvBoBNguvY+oTu22XGFbSlw3mC FKEMDfgTnUBFvPIG3pFkXKKCN39ctAxeoquoDLYTt5IGHy9yjRNZC+jcelYLatAVT/QJ +1kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=MaEKqQ4yrhyoPq4k998DhTByzu47qfX2aAFyiymtVUo=; b=MpOeHXVW71E+56mXAPYaFL3YhH4QImvtHmwN8fs7Z+MtMK3z6jGeDt2qmogYp/JFZU xE0F3IKc6GZ7Qn8ZRf0rs5QIxv4gA+dN7YazHZdPJWCZvhtKeMviyMeuRUFsUmUAzW4N OWjPsSD1GbR55imT2ReUjJt3q33lCRmgK7KIRpzOZgCY4BwccBEZE9UXfQuqsZzZdHVm 7tbCEjhbEjarJLaeyNHMOJo3Kg8K4m1MAKCYQ9eBXpj6X0FvmM5/gNtQ8Qo0SOECXxkI 3kYHpr0BNixRaK8YUhzkFn9cXT2p43V+X0FIbrcUHkCWditATJ1UF2+Bhl/Pke58IzMo WR9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si6628823plv.520.2018.06.28.08.49.30; Thu, 28 Jun 2018 08:49:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933933AbeF1MeB (ORCPT + 99 others); Thu, 28 Jun 2018 08:34:01 -0400 Received: from foss.arm.com ([217.140.101.70]:46672 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753549AbeF1Md5 (ORCPT ); Thu, 28 Jun 2018 08:33:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 14C231529; Thu, 28 Jun 2018 05:33:57 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D416A3F5C0; Thu, 28 Jun 2018 05:33:54 -0700 (PDT) From: Mark Rutland 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 Message-Id: <20180628123347.52963-2-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180628123347.52963-1-mark.rutland@arm.com> References: <20180628123347.52963-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Alan Stern Cc: Andrea Parri Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: Paul E. McKenney Cc: Akira Yokosawa --- 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