From patchwork Thu Mar 2 03:18:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13156665 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5252EC7EE23 for ; Thu, 2 Mar 2023 03:18:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1DF96B0071; Wed, 1 Mar 2023 22:18:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DCE3D6B0073; Wed, 1 Mar 2023 22:18:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBD706B0074; Wed, 1 Mar 2023 22:18:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BCE1D6B0071 for ; Wed, 1 Mar 2023 22:18:50 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 918BDAB6C4 for ; Thu, 2 Mar 2023 03:18:50 +0000 (UTC) X-FDA: 80522501220.14.E00C19B Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf02.hostedemail.com (Postfix) with ESMTP id 16D6580006 for ; Thu, 2 Mar 2023 03:18:46 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677727127; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=Y78i90b49Fh/f9/pQcGtCvCwcUbpfGgih/ujgExwl1g=; b=iew5GjH4zhH2VSrX7EYZbE/ljmfX3RAv/xMbFJHUdgaxT8RbpIgoVn6VHynOm+CO36P0bp tga9SaLaDnx41TgzcxP/BNvtU3ivBv6WKJWhdW5lrbM6xOOzlR+NKqmRyDTMzaSGmlv7Ub P9xmpxo39MKpXV7J9eJEhrVSgSBoFh8= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677727127; a=rsa-sha256; cv=none; b=JHSuPzY6VQ5ZBDF4wE7SPoWXaj02ZPs9msEw/ViPa72t7jhIELsagzulnyyZflg8yHZguB tIOGKpVtIalG/sgueWbqbIPDQaps07JdsaNGPGCM8QhhvrLKRn6/kj6RdxOvcsjpNXSP7Z K3VGrzQBKkM9Jmng4NUKcEbpylV1oZA= 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 36F511FB; Wed, 1 Mar 2023 19:19:29 -0800 (PST) Received: from a077893.blr.arm.com (unknown [10.162.41.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 92D323F99C; Wed, 1 Mar 2023 19:18:42 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: david@redhat.com, mike.kravetz@oracle.com, Anshuman Khandual , Jonathan Corbet , Andrew Morton , "Mike Rapoport (IBM)" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Christophe Leroy Subject: [PATCH] mm/debug_vm_pgtable: Replace pte_mkhuge() with arch_make_huge_pte() Date: Thu, 2 Mar 2023 08:48:33 +0530 Message-Id: <20230302031833.360679-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 16D6580006 X-Rspam-User: X-Stat-Signature: x8m7rrb9pahwq54ta3uh3zjf5h5cpnfs X-HE-Tag: 1677727126-469989 X-HE-Meta: U2FsdGVkX1/xU5oXnAD1wii0VI8mjz5bUV0yhEfMIRDF47LJxPRTdFueYDSlHrmMBC/fUW5HCVxdmY/XPFSaa4I4TSwV2xq92pswc9+bSKSPRIDGz2Y8m2c+oaReI3haDHRRnoNoqZkZxzKurymAw9yvBsbQtY3YU9XUbdaG07WVF3C+vAnR09y5J63QyYI77qTEeb3Efng1WtQcSV19Y0LHmbtxNJMc3C+VxJ0aOYcgOiTknst/UYAQGiLJue2EfHwbwK3kpqfm1xgKi04OvCFOC6ELS8K9cdJIXxKCRHdOyghMB2w7OXaqS3nzjnzx4PzNe75PpruT1S1Cz75moA/zP4aymclq/J+65rFFP9VaHnY5ELDnRThrOieReM0tIgHZgS3iFwtS5eQNuFplMfmOXkZOzgTltiEP8a7Bsia1g63wN7ZKrAKLJQyHLEume39BXqecxUFUQWbUhPRsRf8oGFOJLNYlMXP1EoZJpshXWlQDNpdklk4dCHemD8SFBn2WYRDEnxhgzFj92youfTUp3KN73RanpYM0nD14x3qS3SG17sZauVb6Jwt4n3nl4RVQSNVKn+kh6xrxRZ4UaAx2QKKeLfy+BEN4vptr9w54QTg/oY+fJ1kw3FmQzh2v1WFRIXqSBgwF2QxdESmNftyrdpWPwSnWhZ6OO9PH/AVoQp0Y66khwIk7l63oo8Twcbh4WatX7ioz94sJWUB5GKG6VvoCzWOXBxIbTembGlgLXqw59dY4buA1U0gceXAuzJxurh5LYJpwHZt8IKvXOkMo2loeRyckE6EtMmVRfHtNw1vfn+DExXgokiVZhYFy+A7dTcMjFZzdx6b/G/v4h0ctzMVuPjVQwLQQOlysnYVUwd8ltZTA1lcNi3DnIKeyYdUfevs97Z2QrCRTBVUslrfszvZylkg6uTW5mYU/TYRmwgW0gyx75nr+FeAWKa7/+CKWkvx+JOrt9weibmb CpujWZFz dTCISAll9JinhdeFmbd12dI83wXBG5pgH+HLd/gt3FFDnfImVRMK52+LSUhigYgc/WQxSNpdVx0uei+dhoG6Cyzinxi/ww+jzBcRRP8eHm+sWN4hEPqVqxAgIRcp6edwQMQQit23gjxWIe8tw8Xu/Nyo1lwms8q3wOr87Q7PX4u8k2Sl7zq6cN2NMFcOfWXoeUymG7FhL2mi9CsdRkSod0lUS5YzbwskQP3omjKQiFI84+1SlRiwGTX3RGz2i43eJCRNo6wiLlT0iqTd4t0Ji2X+VfKWKLrvYSiGA3vCzBcdX3S7rsbIQZL7v6q+tnqIIHCrJIfliKNOxvNtWQGv4D7sZ9gNsR9WgqVvtGxFMZnm8ZDI24Iw/gyGTWhfDyBk9hFweS+A1/B3cHbFQ/fEKmCi+8RREuXh2vsaYY+e82YnN5Wrx0sXiM5TCxGzA8AYM+my958Z0ViaLvMNG+0+ifI+QSpf4eRZUMFNJ9BCk2InMmkK3dN/7kjHEizuWoktBV7gOf2dRN1KfqUg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Since the following commit arch_make_huge_pte() should be used directly in generic memory subsystem as a platform provided page table helper, instead of pte_mkhuge(). Change hugetlb_basic_tests() to call arch_make_huge_pte() directly, and update its relevant documentation entry as required. 'commit 16785bd77431 ("mm: merge pte_mkhuge() call into arch_make_huge_pte()")' Cc: Jonathan Corbet Cc: Andrew Morton Cc: "Mike Rapoport (IBM)" Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Reported-by: Christophe Leroy Link: https://lore.kernel.org/all/1ea45095-0926-a56a-a273-816709e9075e@csgroup.eu/ Signed-off-by: Anshuman Khandual --- This applies on latest mainline. Documentation/mm/arch_pgtable_helpers.rst | 2 +- mm/debug_vm_pgtable.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/mm/arch_pgtable_helpers.rst b/Documentation/mm/arch_pgtable_helpers.rst index 30d9a09f01f4..af3891f895b0 100644 --- a/Documentation/mm/arch_pgtable_helpers.rst +++ b/Documentation/mm/arch_pgtable_helpers.rst @@ -214,7 +214,7 @@ HugeTLB Page Table Helpers +---------------------------+--------------------------------------------------+ | pte_huge | Tests a HugeTLB | +---------------------------+--------------------------------------------------+ -| pte_mkhuge | Creates a HugeTLB | +| arch_make_huge_pte | Creates a HugeTLB | +---------------------------+--------------------------------------------------+ | huge_pte_dirty | Tests a dirty HugeTLB | +---------------------------+--------------------------------------------------+ diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index af59cc7bd307..92bed5bd5879 100644 --- a/mm/debug_vm_pgtable.c +++ b/mm/debug_vm_pgtable.c @@ -934,7 +934,7 @@ static void __init hugetlb_basic_tests(struct pgtable_debug_args *args) #ifdef CONFIG_ARCH_WANT_GENERAL_HUGETLB pte = pfn_pte(args->fixed_pmd_pfn, args->page_prot); - WARN_ON(!pte_huge(pte_mkhuge(pte))); + WARN_ON(!pte_huge(arch_make_huge_pte(pte))); #endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */ } #else /* !CONFIG_HUGETLB_PAGE */