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: 63183 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4015085wrd; Wed, 1 Mar 2023 19:21:40 -0800 (PST) X-Google-Smtp-Source: AK7set8CQQmb0CoKG+c8he6fchWOvk4pajnNtU2XJV81TM5553ROXRb+gHOGk7CWtkd8W9O8zLgU X-Received: by 2002:a17:90b:1d86:b0:237:99b8:4eef with SMTP id pf6-20020a17090b1d8600b0023799b84eefmr9990930pjb.9.1677727299703; Wed, 01 Mar 2023 19:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677727299; cv=none; d=google.com; s=arc-20160816; b=WtRyrhyf/5iHvFm0agRe8X9O9L3J9xL7jIU05bcKMyHa+ucVHC1K+dL2eVuZEx7JkB lN9zK75STL0FCTVh+U7R8QqywVQK1DJ0URMOsIy+lSuXRZ5571iBEkGwhRJjDP5yBOFM vmse7TDHfmj3/zW4KahhxNWw1IY6h2U2Y4EACKkft+KQ9X0aEfLXLmgLLezOgK/ueo0O kVY+A1/XO3e4Q2FXYcLc0ac5cpZVyLTuWPSzXC+r0iKENfOdxQUu4iAhOMRJKXAx3G4p /DEUaLCNA8UwjOIsCuRhRPvmyC+eedU1YIHyaiyaloAnMrZtTcNDaTWKbBWCwJWK5xMC oXYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Y78i90b49Fh/f9/pQcGtCvCwcUbpfGgih/ujgExwl1g=; b=TxMCcSnBC371hKm29aPl3nH+PgEbXsYQFgkjzYwQRKmZnP3hgej0cSgI6u+wfKtBXo qRoIsyk9U+rUDlRqb4TJtxPbkzdXlE5tnu2mv0d6KK3Q53/RncmYBBfQKn0j4gbk82pX tdqrrHpF7qaY5BFWfPz2RTlhIhI1dXGwC99ZgWwsmbTo4nQIHXhp/RcdmxMG9aZ+DH/l nnJJ56lvjRhRE8Ojy+LRVYnKoqrajiSUKkWfE2YduEn+DjBq7udYr9uHsJ7piC5tokDe Sydm73EGG6vK05gaLPngAxQte4bczSMyVS88lmQkwYowZDhffnKi1/MTf34eHa2UFWqz BHzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei18-20020a17090ae55200b00234b160dd74si1289427pjb.26.2023.03.01.19.21.26; Wed, 01 Mar 2023 19:21:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbjCBDSs (ORCPT + 99 others); Wed, 1 Mar 2023 22:18:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjCBDSr (ORCPT ); Wed, 1 Mar 2023 22:18:47 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A79035BA; Wed, 1 Mar 2023 19:18:46 -0800 (PST) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759224581215997077?= X-GMAIL-MSGID: =?utf-8?q?1759224581215997077?= 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 */