From patchwork Mon Jul 16 18:05:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 142086 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2708843ljj; Mon, 16 Jul 2018 11:04:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc3e7TJS1Wgbr9eg/pa9DqW2oNv0/rbDgNfDj4ur80SnAmYiD4VE7K3sMHPodyyxvLjze9+ X-Received: by 2002:a62:2352:: with SMTP id j79-v6mr18649006pfj.221.1531764261375; Mon, 16 Jul 2018 11:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531764261; cv=none; d=google.com; s=arc-20160816; b=l8y4asSLrBXSqsKUB2H97cOVMoIePzgY5NjHP3cWGtY07RH8qXGoFNpNS453COdvy1 tvVdieM0hTqVlp9mmIw16otcnFq+Y7Z/GB5M7RbIN2crYh9eQGGwrhfaA+w9+dFBGIUr zPvkEgNSOHYnVJCEJWzq5Qx0/xWJ+5Bi3D5Uq/8ux6wIf5IqgTCsnk7IQGc1XYwIdC8J XvGUkEU6BRzBr6eln7jgEBPx2eXz+K6RvAcSFnd18dpLV+bU/oRoFWnGGpXa8CEzdXG1 zHwpfyc2PlIsn9BhLtMKnY/+yZ6lW9G+2965v40Bij7OwvBbGdgNgLIOM8XAap7lRDiB 1Z9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=2NRzIKXFgrWWiOC3qjPKFvy34rkN9PN+LhbFOByQdWA=; b=KViPca66LFLgMpCbfRv0b2XDKolzELXbsVQe4us3R7rdN5koqtgkuQalPyQpqTFXou cZHl4gN6ybEN8oLeoFMomOf1cewO4bisjH4dH8c1GZs7d2TMnvCFhqUyie4rfZq/IOlc n5SC6f5Cb3SuHBEcG1kIoSEvD98TESWO4CO5wjDJMLa6ZtzFkZhdzKa/HRqaVaCtJAxB RaS+b2W+JmlsJ/6zzFmRouPU6CYwwJ1f7rlA0hVdNtgnlHHq++iMNABeYoZ3TPR1gnu1 9IOJ2HV/rHrSAg0lZAh1kPPStOe2/bta17t58moB4c2tZM/BwynxvJ1BKUMAZh2LWCZa qv4Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si2732273pls.392.2018.07.16.11.04.21; Mon, 16 Jul 2018 11:04:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731006AbeGPScu (ORCPT + 31 others); Mon, 16 Jul 2018 14:32:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55060 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729946AbeGPScX (ORCPT ); Mon, 16 Jul 2018 14:32:23 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6GHxD1j083123 for ; Mon, 16 Jul 2018 14:03:51 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k901xrjgy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Jul 2018 14:03:50 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Jul 2018 14:03:49 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 16 Jul 2018 14:03:43 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6GI3gAE6095428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Jul 2018 18:03:43 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F077BB206B; Mon, 16 Jul 2018 14:03:35 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D0E08B2064; Mon, 16 Jul 2018 14:03:35 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 16 Jul 2018 14:03:35 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 3743416C42AD; Mon, 16 Jul 2018 11:06:06 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@kernel.org Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com, will.deacon@arm.com, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, Mark Rutland , "Paul E . McKenney" Subject: [PATCH memory-model 05/14] tools/memory-model: Remove ACCESS_ONCE() from recipes Date: Mon, 16 Jul 2018 11:05:56 -0700 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180716180540.GA14222@linux.vnet.ibm.com> References: <20180716180540.GA14222@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18071618-0040-0000-0000-0000044F9FF6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009375; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01061729; UDB=6.00545095; IPR=6.00839634; MB=3.00022159; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-16 18:03:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071618-0041-0000-0000-00000855C9C9 Message-Id: <20180716180605.16115-5-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-07-16_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807160205 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland 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: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: Akira Yokosawa Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney --- tools/memory-model/Documentation/recipes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 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: