From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72835C021B5 for ; Sat, 22 Feb 2025 11:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=M6gW/I1mf2mjWjZBwnLuibAjaEGD/kCLfNNrvt9WDCc=; b=yxQ8GWr9MbsTzqNi03ZUSQ5W9a WmBbdakvi0ggi4y3ED2aIVM2pOUFxmor0OrlQkAC9cQ1Cz8IXHe0A0ZL6tv/lan3CISR9sFlP0tcR VZ+7AzRw6oK+xSalROINqUZBluBejb15kYxQoLSCYqX4Ws3vUf2PkxtzOjjk0euoUTenH2hGQao2z k6oBTYTRc4SiEybLQnAgoPS44TMvJFXK4vkES+pfO5sgKS2yskv5Dmb56lrvHfofReUW/wUbTweIX G5zY/gigNNhu+ugOYn2fiAu1nXasez5FKCTyJwW5htD68JYERLrLhw8alMl/jQccrlGkJefuhQl1y 3VZzG7zQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tlo9G-00000007y9z-0qWI; Sat, 22 Feb 2025 11:58:22 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tlo7l-00000007xsy-2Sov for linux-arm-kernel@lists.infradead.org; Sat, 22 Feb 2025 11:56:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A127A5C55E8; Sat, 22 Feb 2025 11:56:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7D3DC4CED1; Sat, 22 Feb 2025 11:56:45 +0000 (UTC) Date: Sat, 22 Feb 2025 11:56:43 +0000 From: Catalin Marinas To: Ryan Roberts Cc: Will Deacon , Pasha Tatashin , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , David Hildenbrand , "Matthew Wilcox (Oracle)" , Mark Rutland , Anshuman Khandual , Alexandre Ghiti , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/14] arm64/mm: Hoist barriers out of set_ptes_anysz() loop Message-ID: References: <20250217140809.1702789-1-ryan.roberts@arm.com> <20250217140809.1702789-7-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250217140809.1702789-7-ryan.roberts@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250222_035649_695181_17CABBB8 X-CRM114-Status: GOOD ( 14.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 17, 2025 at 02:07:58PM +0000, Ryan Roberts wrote: > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index e255a36380dc..e4b1946b261f 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -317,10 +317,8 @@ static inline void __set_pte_nosync(pte_t *ptep, pte_t pte) > WRITE_ONCE(*ptep, pte); > } > > -static inline void __set_pte(pte_t *ptep, pte_t pte) > +static inline void __set_pte_complete(pte_t pte) > { > - __set_pte_nosync(ptep, pte); > - > /* > * Only if the new pte is valid and kernel, otherwise TLB maintenance > * or update_mmu_cache() have the necessary barriers. Unrelated to this patch but I just realised that this comment is stale, we no longer do anything in update_mmu_cache() since commit 120798d2e7d1 ("arm64: mm: remove dsb from update_mmu_cache"). If you respin, please remove the update_mmu_cache() part as well. Thanks. -- Catalin