From patchwork Mon Nov 27 10:38:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 119665 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp55626qgn; Mon, 27 Nov 2017 02:38:40 -0800 (PST) X-Google-Smtp-Source: AGs4zMY4BNnGAclU4imC+78+G1iDVsjexj/SFJBw+1eCO0kg12VxZwG2II7Jl7n9XRc4lVife+qA X-Received: by 10.98.102.219 with SMTP id s88mr36523215pfj.191.1511779120411; Mon, 27 Nov 2017 02:38:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511779120; cv=none; d=google.com; s=arc-20160816; b=J4t3xYfQR626BWAa1D7u8R4G8nLhbjwdI12eopm+wvVecBzS/uEoshvBVoLVEgiN1A NvE3bwRHSCg6PkCsf6E2ksTOIPBQcgfoGzsFQ2cUnr2Ek8FunE0KyQzHZq3KX5/yd6Ro gRBHA0CKF9P65AVZPKHT2gMo9IJdUZgwWWC8GR8aHv1pgjze9tVAR1Yuw4BS/6SvEJNm aBWLCUCrjDT1pcI5a1BSbSl4jlCWfCxcD6cve5Gdsh7IgEujpzSuQtOXVCCNdxUxQ0ab X/WjSQBz3YuCDcCtUB+VCKj5C5Q36CCeDzS991FVrvTD5tgbO9wWbi/B+N1OyHEV4Ijv srZg== 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=cOcZJYlZifhTu5q3nXfaNXm5fZO64SbILsxElUWFdlM=; b=eofr0JBX7bCtOd2yEp+Twe1mDob5UTe/q/Hh0hr1tgYpc5nqmlVKj6mIc4XGbwJeLl NFYHNGOxLl2SQ6GCca+4zemhBwBwrGF9hfmhfEfJjur3o+w2roWqVDJ9cvFDKRnAjay8 bfb41AIYk3Q9rHAsCRVgxVCczy1zrb/vHMTzxWZ4h26mSUPEYkwiqoaniCJJNBW7EqjL V4FWdGOj029cXSJASieaWN09pb2N2dadv0Sw4iKHVLqdRshy5WU+7rjyyxvUvOu1B75W bJOKL52IW5O287ie17aNk8VBHQTllJSx96wE1G4hKQXnfbpwlMREG8abLYM01H1HpqeF gS9Q== 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 y12si22719157pgq.348.2017.11.27.02.38.40; Mon, 27 Nov 2017 02:38:40 -0800 (PST) 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 S1751951AbdK0Kig (ORCPT + 28 others); Mon, 27 Nov 2017 05:38:36 -0500 Received: from foss.arm.com ([217.140.101.70]:35764 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835AbdK0Kid (ORCPT ); Mon, 27 Nov 2017 05:38:33 -0500 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 8C5661610; Mon, 27 Nov 2017 02:38:33 -0800 (PST) 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 099B83F246; Mon, 27 Nov 2017 02:38:31 -0800 (PST) From: Mark Rutland To: linux-kernel@vger.kernel.org, mingo@redhat.com Cc: acme@redhat.com, apw@canonical.com, joe@perches.com, mark.rutland@arm.com, paulmck@linux.vnet.ibm.com, peterz@infradead.org Subject: [PATCH 1/4] perf mmap: Convert ACCESS_ONCE() to READ_ONCE() Date: Mon, 27 Nov 2017 10:38:21 +0000 Message-Id: <20171127103824.36526-2-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171127103824.36526-1-mark.rutland@arm.com> References: <20171127103824.36526-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Paul E. McKenney Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Joe Perches Cc: Peter Zijlstra --- tools/perf/util/mmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 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; }