Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp646421rdb; Thu, 15 Feb 2024 10:45:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWjO23sODYpSQxr9WosoVU3HajodnWvuoHQBQFy7cOudF0mSKs/a3tU6t9UAt5YvTLgh3JggmA20X9CWDthfNPXDLe2879QNAeHt9NRKw== X-Google-Smtp-Source: AGHT+IHGbBVz82G3rF4i2F9Y+eujr6sFKWs/aOYopHg7YDWWtYm8lpAVzruJszwALQ83YEcmZXbx X-Received: by 2002:a05:6a20:c90c:b0:1a0:5f8b:2cad with SMTP id gx12-20020a056a20c90c00b001a05f8b2cadmr3232614pzb.13.1708022725396; Thu, 15 Feb 2024 10:45:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708022725; cv=pass; d=google.com; s=arc-20160816; b=x77+houZZKEgYx/1k1tXahZQbataWdXbU0DH+BmWiMn/U+7Hok1dlMMtWDly9jTc2x 5Nwdzw//imm44+Nw9zsU9/DEuPKNiPDo4uG2GVRoJnTV8x5+wOeDJq2UdypkKTzWIsOX egNFji6iUX8aVd5euuPO1qUeUFdPO8EfSinC8xWYKBzRAm0vX828XHUe3D9LPEHc4gey S2C/YWGTXBKi8t75UlIb0kYRxu0sG7NLAH4qL3NZKN/NtMae4Q+1Fa0bg/dw6KkTDg+H kfJgoT25+K4VfD73SFhq4hfq+K2rlglOUMdrzU4sLUsvw+NucfWUqypVaT+843dHG/Zj cLAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=FzaDe5fBN9Z890F47Lf1hVNiTSujwXbnEnr5H7GLn9g=; fh=r8G2JENgcRo/RTe4xvZO7IzPLZ7yvHykzgF2Da/HHrw=; b=G6qk1mLAk5zcT2zxvoOkWjwzCwXJJiVz/l3QDlX8PB6ZchJ5OQpmzyon/KiFyWEWbC 3L03+iOmwRktOnH6yTXBA+Sa7ceSf+PRwU8lhDANZ2VrrNybUjQmLkzMgpuVzNJ6hn6e qvx93v31gUm3pt1LpYpb+LO6uFqd3pcg1cLcYlyi85JxF4djlZUJk9azO1T6+UXfT6xA /RvklB/iCjV04vofZR2TopbwJk6gSJ+9LNTd+o9opOMA17sdnR7YzpcRgEcBQQC526xH wcHAeNjq4Cmi1xEebVG2kM+VqgVPJHhoTyb+OkafxlOWSVfAhy8qYa+tzZyPTFpi4G7E SL5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67518-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l26-20020a635b5a000000b005dc81a6b2absi1472887pgm.792.2024.02.15.10.45.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 10:45:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67518-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67518-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 905652905C6 for ; Thu, 15 Feb 2024 18:35:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 236D213A250; Thu, 15 Feb 2024 18:34:09 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65A17139597 for ; Thu, 15 Feb 2024 18:34:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708022048; cv=none; b=e6dDkmuN0k11ao5fJS32fiyED+uUTBSzprPDIfotx+6jZVXTcKprDO8wh9XF3hlIq+VXeeSs5Gjjld63Lydi7kuEozzzfl1EV4qVKMLgr+owYHw0Qpeg+4rmBDPAQP0qczqihQd/neWNtsfIgoRJya/+94M9SMFiw6Wz0vuEdDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708022048; c=relaxed/simple; bh=no/blXCb0vQawIseQkgHar47hmhAMUTDnXZAbG+6kqM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FRp2ldSmu0f84NX5AfGs2dnlxmBUtaC3kfy1pOb+JWRhXTylTBSsoF0vqK/cmNmHqWptfPhD0UXGuIuZhH3qrVMqMFJ8u9biV7z7tVCAjKgYggbXs54jRlSyJaDaoD6fLXve688tamMhUVUwS/m2FrUBdtEOO2NV9LXABMdhYWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38715C433C7; Thu, 15 Feb 2024 18:34:03 +0000 (UTC) Date: Thu, 15 Feb 2024 18:34:00 +0000 From: Catalin Marinas To: Ryan Roberts Cc: Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , Mark Rutland , David Hildenbrand , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 07/18] arm64/mm: Convert READ_ONCE(*ptep) to ptep_get(ptep) Message-ID: References: <20240215103205.2607016-1-ryan.roberts@arm.com> <20240215103205.2607016-8-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240215103205.2607016-8-ryan.roberts@arm.com> On Thu, Feb 15, 2024 at 10:31:54AM +0000, Ryan Roberts wrote: > There are a number of places in the arch code that read a pte by using > the READ_ONCE() macro. Refactor these call sites to instead use the > ptep_get() helper, which itself is a READ_ONCE(). Generated code should > be the same. > > This will benefit us when we shortly introduce the transparent contpte > support. In this case, ptep_get() will become more complex so we now > have all the code abstracted through it. > > Tested-by: John Hubbard > Signed-off-by: Ryan Roberts Acked-by: Catalin Marinas