From patchwork Thu Jun 28 12:33:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 140437 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2128766ljj; Thu, 28 Jun 2018 05:34:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKphNtEGYlH1Vxn1NHOfMZE37sYc9fkcWinNlEGvQBxF9pe69o1LbEvglASBDiTu82j/y6q X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr10165424plg.68.1530189256234; Thu, 28 Jun 2018 05:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530189256; cv=none; d=google.com; s=arc-20160816; b=TVTNpLyns1Z7UouE1vmpYmpPxwPyBhSffWzShzU7nBt87/fTthCeTyyL8sLBrlPeW1 jztRl2ybIHkFIpT4vohT85thljIFs28nM/LVzsJTjmY5iX81dA0qyk60KsyxxnRj+k4O z1p1/zS8P0S3EypuWsB+7rs2DRciWlawvvONDsAqn1/ofbKHlvMlimGdVrEh5ecATJak cnTZvIZiOlUhlk0rTg54ZIzfi3wTaAQ6eb/SI/Y8mUtczEqbJzwFfxyHe+3wuzhimp32 WTNUWFk9wGISr8pguME6k9PlCu42LrI/wPqDnKNa6dk7/MRT0FvG+9oRwgfCGZZktqwo iR/A== 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 89-v6si6428700plf.224.2018.06.28.05.34.15; Thu, 28 Jun 2018 05:34:16 -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 S934887AbeF1MeC (ORCPT + 31 others); Thu, 28 Jun 2018 08:34:02 -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(-) -- 2.11.0 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: