Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7294D78C7C for ; Fri, 26 Apr 2024 03:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714103856; cv=none; b=LRhFFT/bm9vWZEd2q8svsCj3Hhx8GSVkvI3ILRuPqE4QxgqPWE7/cKAAm6iRGYqKp6m9TQmi0lsnoc9QG++rrZA+2jLvG65Eos9h/PsNUTIUensnxM177Ej0wS9Nf7htQ7b/y2Zbpb+eYqAesW5H+/iiNVankOSDyDHOl3Xed2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714103856; c=relaxed/simple; bh=s/GxTTeM+iTvxBF1pCDVO0HZb5zymCIE5Sxcajxt3Gc=; h=Date:To:From:Subject:Message-Id; b=rqKgaAD8byusBedtjWoXm86mwPxAKNFZBLyhThjMb9wwI95EDQF5bAhtBPsAKQkHaP5www38uLVPfhCl+pcGNgq+wK1KEVE2hh1I6IVO1Ij4uuoAeTkFk9GsuePeGs72EmdZwj90CTfemEj2GpPe7UhhmCrjaTBr0/1y65D5yps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=o6hu26D9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="o6hu26D9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED9E4C116B1; Fri, 26 Apr 2024 03:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1714103856; bh=s/GxTTeM+iTvxBF1pCDVO0HZb5zymCIE5Sxcajxt3Gc=; h=Date:To:From:Subject:From; b=o6hu26D92fTAC+/lFECXhsZC7ftwGX2Uiuma3iu8ITnKdsOFmry2VJAmI6gawLeZe 5Q0KvB2eNHk7FqJBlyu5ujr4OFxnzJ7B52YnA0grRViw5naxZsrbnHxp9R/49oNOd5 5LSNrvO5QtdLqX+jUe4F5WuqMj68/QV1Mpe8pOqM= Date: Thu, 25 Apr 2024 20:57:35 -0700 To: mm-commits@vger.kernel.org,willy@infradead.org,will@kernel.org,tglx@linutronix.de,shawnguo@kernel.org,rppt@kernel.org,npiggin@gmail.com,naveen.n.rao@linux.ibm.com,nao.horiguchi@gmail.com,muchun.song@linux.dev,msalter@redhat.com,mpe@ellerman.id.au,mingo@redhat.com,l.stach@pengutronix.de,linux@armlinux.org.uk,krzysztof.kozlowski@linaro.org,konrad.dybcio@linaro.org,jgg@nvidia.com,festevam@denx.de,davem@davemloft.net,dave.hansen@linux.intel.com,christophe.leroy@csgroup.eu,catalin.marinas@arm.com,bp@alien8.de,arnd@arndb.de,apopple@nvidia.com,aneesh.kumar@kernel.org,andreas@gaisler.com,andersson@kernel.org,peterx@redhat.com,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-arm-redefine-pmd_huge-with-pmd_leaf.patch removed from -mm tree Message-Id: <20240426035735.ED9E4C116B1@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: mm/arm: redefine pmd_huge() with pmd_leaf() has been removed from the -mm tree. Its filename was mm-arm-redefine-pmd_huge-with-pmd_leaf.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Peter Xu Subject: mm/arm: redefine pmd_huge() with pmd_leaf() Date: Mon, 18 Mar 2024 16:03:57 -0400 Most of the archs already define these two APIs the same way. ARM is more complicated in two aspects: - For pXd_huge() it's always checking against !PXD_TABLE_BIT, while for pXd_leaf() it's always checking against PXD_TYPE_SECT. - SECT/TABLE bits are defined differently on 2-level v.s. 3-level ARM pgtables, which makes the whole thing even harder to follow. Luckily, the second complexity should be hidden by the pmd_leaf() implementation against 2-level v.s. 3-level headers. Invoke pmd_leaf() directly for pmd_huge(), to remove the first part of complexity. This prepares to drop pXd_huge() API globally. When at it, drop the obsolete comments - it's outdated. Link: https://lkml.kernel.org/r/20240318200404.448346-8-peterx@redhat.com Signed-off-by: Peter Xu Cc: Russell King Cc: Shawn Guo Cc: Krzysztof Kozlowski Cc: Bjorn Andersson Cc: Arnd Bergmann Cc: Konrad Dybcio Cc: Fabio Estevam Cc: Alistair Popple Cc: Andreas Larsson Cc: "Aneesh Kumar K.V" Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dave Hansen Cc: David S. Miller Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Lucas Stach Cc: Mark Salter Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: Mike Rapoport (IBM) Cc: Muchun Song Cc: Naoya Horiguchi Cc: "Naveen N. Rao" Cc: Nicholas Piggin Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton --- arch/arm/mm/hugetlbpage.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) --- a/arch/arm/mm/hugetlbpage.c~mm-arm-redefine-pmd_huge-with-pmd_leaf +++ a/arch/arm/mm/hugetlbpage.c @@ -18,11 +18,6 @@ #include #include -/* - * On ARM, huge pages are backed by pmd's rather than pte's, so we do a lot - * of type casting from pmd_t * to pte_t *. - */ - int pud_huge(pud_t pud) { return 0; @@ -30,5 +25,5 @@ int pud_huge(pud_t pud) int pmd_huge(pmd_t pmd) { - return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT); + return pmd_leaf(pmd); } _ Patches currently in -mm which might be from peterx@redhat.com are mm-userfaultfd-reset-ptes-when-close-for-wr-protected-ones.patch mm-hugetlb-assert-hugetlb_lock-in-__hugetlb_cgroup_commit_charge.patch mm-page_table_check-support-userfault-wr-protect-entries.patch