Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp370407rdb; Thu, 15 Feb 2024 02:48:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWn0b2dG7fB2rJmM2OILKexIhXt+FTQlXvOET2f3eyJdE4lGayPeMpY9BBVEpBhlB7KYbiuEwx4VSli3qh6+ghDd2z3BcRs35HuM/B5lQ== X-Google-Smtp-Source: AGHT+IHrCUrJtYY6hExRwEhK93LNxpr1VVgkXMeD9xjsovsdDaqqxZcmzLSaZh1PwdUOe45SI5Mn X-Received: by 2002:aa7:850b:0:b0:6e0:9e95:b3f8 with SMTP id v11-20020aa7850b000000b006e09e95b3f8mr1384172pfn.9.1707994080897; Thu, 15 Feb 2024 02:48:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707994080; cv=pass; d=google.com; s=arc-20160816; b=ST2z2w+LO8zoeXA7ayYs2IPvxbQ8rNKyVV8QqbYvXT8cPZnIBVpc6TGovobTgcAO10 DPRWtCTMXFSnoL+Aw2a0XT7zv6QPDTArwaOJCpYH2Y/CrcbT7MMgfw7lwt1JGjA9FhKq qYDgPD/l1iw2tKW+H9yzT/bM3Msra1V6Obbw4Iy3JgUIbB1ZKjwlfIvppmFGrnUxfCsh 42nkMQSxtArkYvFgUZtOMmn6bWzxEfM5giTE1H2t2u07IFhZbugbFoyKiiPaEjWh34sI l141h4wC4nGf0pNAHVDMPeMDBMH67lrX862okvEWapMx9hhA5th3nNRzYlmOsaMrYk6T hyfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=NNqJIU65wxbHkraYUk5NQY8zX49rVnFHXTzrcPivxfA=; fh=Heagowc1O8zVDXTyU76nJjOwDjz9r3Gi+0zmhF4ZELQ=; b=rvx1njnylM1nviP5pvQ4isEU22mBqexT7/8RSLqAondXkdowu9SbRdCsqld3I1lWWU iriYMlvaB8L0HDzMVce8/rIKJS3QcXmzygemUrKOL1IIW8OAvvQ95/Ue2eJfSZVGg12y gI1nb1bfklpfWuUcfSv93XMFtOSJqjNm5iFq47AfH+o+eHWvoiFUfFXitx4YkX7ek9lc 4VR9MmJNqA2Kf22rr2UC+EayoOy0AVIt79Iu0iGkhe4Cp/EgTfgXox4iAL8ynflv88Te mjIGqIPsT3kh4bJGB2bJXFL3mNLK8gqDKoRFm3pkXUE9164mAGxEAh1HlqN3lYAJKWj9 tgzw==; 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-66645-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66645-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. [139.178.88.99]) by mx.google.com with ESMTPS id m20-20020a63f614000000b005d59eb08d15si955924pgh.383.2024.02.15.02.48.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 02:48:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66645-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-66645-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66645-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 86028289DA8 for ; Thu, 15 Feb 2024 10:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1768F12E1F2; Thu, 15 Feb 2024 10:32:53 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BAE612DD8B for ; Thu, 15 Feb 2024 10:32:51 +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=1707993172; cv=none; b=UVytpcxV/zGAWnWqKakhUUTr1eieJEBpS/jQThIYb63ib8cyf5zBYASWCDnt4MrjbWGzDdtVWXFUmPMT7NMZdm2B1Yb7gkOIv5hjMTZlQQzCeJzQu1sNWMlWSVgc6tApaTAkkl+vmLurkUMEj41oqUlZ/y1M2hgNMVuX9hJ8gds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707993172; c=relaxed/simple; bh=7L0V2A6x2ZTDwqOnJsQvbevz7Qvgf2Zqp4ANa3PXVOU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gzBp/uaKWx7M+2u/EJiJYLaN8Bmh5VGQp45aJrgxaYMkpnzRpgwSD9DMdddRWXnsIn5Wtyda+3zxSGYSJ2uJdyHxfuwMu2c6W4AqVucdvonL4YfWZA0dcUvNidSDOTBp3+NYAjfjNphfC6u2WIYOZNdXEhzYLvCORtMkES3o7m0= 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 86F1E1570; Thu, 15 Feb 2024 02:33:31 -0800 (PST) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D7603F7B4; Thu, 15 Feb 2024 02:32:47 -0800 (PST) From: Ryan Roberts To: Catalin Marinas , 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" Cc: Ryan Roberts , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 09/18] arm64/mm: Convert ptep_clear() to ptep_get_and_clear() Date: Thu, 15 Feb 2024 10:31:56 +0000 Message-Id: <20240215103205.2607016-10-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240215103205.2607016-1-ryan.roberts@arm.com> References: <20240215103205.2607016-1-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-Transfer-Encoding: 8bit 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 --- 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