Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp385923rdb; Thu, 15 Feb 2024 03:20:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXsQ2K8zx2AT2ZACjuZEv9PUKfHZgPW37TdbBlZ2bK7tOiHwH9wg0qLcFd7WuDcYWNU5mSz+X2GXcP+pZnNXdTqvyf9imu2JQ1g3jyckw== X-Google-Smtp-Source: AGHT+IEnFso6eDYRNhuOExGYrQ01SWgHik1LnGjNBGyWo0ooba3Rqtan9+NVynZ2vzLspRkxp0FL X-Received: by 2002:a05:6402:e8d:b0:561:ea0:e234 with SMTP id h13-20020a0564020e8d00b005610ea0e234mr4825721eda.16.1707996048130; Thu, 15 Feb 2024 03:20:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707996048; cv=pass; d=google.com; s=arc-20160816; b=Pl508N9duiY9bhtgcRAwxNGPRbJJe4pdnt8aIwRiaMRW6N02BZds6EaaJHmoF3Wz1o cw+bMIRK0xI5MMoaI28gkSvQnRI7B4S6MuqqqCDgu+qd3V6bkduDNP6VrOS8PpYr00Ay Oh8SBJK9Ylluzz/GAnN1lbopUQJhgux7EGW82gxmQ/XR+NQLl9i+1rhcIdZc4qPv5b/T wLXixuqB8Qe1CYUZbLLJPeHr9pyMxg/AaG1pKHRVLM43WQUluSnMlc0FzdLwMZnPxHd9 nimO2Cn+O/yCzXbqJVlx+0DZQmYSsVsn6MPigQ/8hPGLb+VwRohsYaCYxA3CmEFUmur6 0E6w== 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=tH2elRLSe7WOgZdPnk8RrzizqylLRzqaAMmDkAnF/2c=; fh=L1spsrv307lYRQgjy/3hwbvQ7NVbJ0u3hqQHYo6XNQg=; b=DS9G8U4Ue3lNCr7xIfkXqyhFtfFQ9n1T7eqtVK0lgf14qsohj4XwNLBcIJkjTRjEwr 37sbB7pfyWGGOmECmss8leewpIHUlFWHhtZ7qmL/oWIiSXqQkMCFUE2coHRg4AXBsbxj vUUE9V3g6jbQOCq9LMVT1+uecwQWqynTPqPbz7cUU2kdjt5E13Z7e/2q7WrP9x40MyH7 cDLIFHmbZaI/9KD4+yhmzX+XuxGmcwhwNZ9VZ2ajlHov2fwkCWkCpN4LpLJXDa2Lgu+W tfTISFJ5o9stWlu1mkdSsgnBFeyj2kSrQG1zdqoiHkE2JppCPUAYLMDKOgD2QRPj1ay7 IyFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-66774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dm27-20020a05640222db00b005619efb390bsi554447edb.400.2024.02.15.03.20.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 03:20:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-66774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66774-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DAF5C1F22B5C for ; Thu, 15 Feb 2024 11:20:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0930B129A73; Thu, 15 Feb 2024 11:20:30 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BF221754B for ; Thu, 15 Feb 2024 11:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707996029; cv=none; b=hbJPM3vdW77NP9IAoFztzzYDEW198WZ6sMtLZ9yIttnRzt/gAW4sb1Fk4Tr6HlXK61daTISA7PkHwl3U+xfvPCcEvu4x2YCzKI7TYSJSvc/aXKtbSxE/1Cq4qhcB7boN2QLrYBl/uNt9lBqb6UnNe/XSUUrbuAqZ/iAXQdyfmYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707996029; c=relaxed/simple; bh=ERm7crb8AKRDzU3t/QbI3t84e5YD5OM9MQl25WQ8QDI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WDwZ1bUR6KRlM/7OnYybfzddBQR21v4D/HyzCxqDXLwrj2VRuMNAv7u34IsSJutumhgpOaIUW79nVqBdP01OX1mkx+iMPbQ5Z295Ggj0dMLLoZ4LVdfiQiimQGx5wFh6gbZrTjzVQGTNsCtYk2cdCFDfNcCB9+lAP3Rg72Eb4xE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 816FD150C; Thu, 15 Feb 2024 03:21:08 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.68.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 045423F7B4; Thu, 15 Feb 2024 03:20:23 -0800 (PST) Date: Thu, 15 Feb 2024 11:20:21 +0000 From: Mark Rutland To: Ryan Roberts Cc: Catalin Marinas , Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , 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 09/18] arm64/mm: Convert ptep_clear() to ptep_get_and_clear() Message-ID: References: <20240215103205.2607016-1-ryan.roberts@arm.com> <20240215103205.2607016-10-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-10-ryan.roberts@arm.com> On Thu, Feb 15, 2024 at 10:31:56AM +0000, Ryan Roberts wrote: > ptep_clear() is a generic wrapper around the arch-implemented > ptep_get_and_clear(). We are about to convert ptep_get_and_clear() into > a public version and private version (__ptep_get_and_clear()) to support > the transparent contpte work. We won't have a private version of > ptep_clear() so let's convert it to directly call ptep_get_and_clear(). > > Tested-by: John Hubbard > Signed-off-by: Ryan Roberts Acked-by: Mark Rutland Mark. > --- > arch/arm64/mm/hugetlbpage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > index 27f6160890d1..48e8b429879d 100644 > --- a/arch/arm64/mm/hugetlbpage.c > +++ b/arch/arm64/mm/hugetlbpage.c > @@ -229,7 +229,7 @@ static void clear_flush(struct mm_struct *mm, > unsigned long i, saddr = addr; > > for (i = 0; i < ncontig; i++, addr += pgsize, ptep++) > - ptep_clear(mm, addr, ptep); > + ptep_get_and_clear(mm, addr, ptep); > > flush_tlb_range(&vma, saddr, addr); > } > -- > 2.25.1 >