]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64/mm: Drop setting PTE_TYPE_PAGE in pte_mkcont()
authorAnshuman Khandual <anshuman.khandual@arm.com>
Mon, 4 Nov 2024 04:16:17 +0000 (09:46 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 4 Nov 2024 16:21:31 +0000 (16:21 +0000)
PTE_TYPE_PAGE bits were being set in pte_mkcont() because PTE_TABLE_BIT
was being cleared in pte_mkhuge(). But after arch_make_huge_pte()
modification in commit f8192813dcbe ("arm64/mm: Re-organize
arch_make_huge_pte()"), which dropped pte_mkhuge() completely, setting
back PTE_TYPE_PAGE bits is no longer necessary. Change pte_mkcont() to
only set PTE_CONT.

Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20241104041617.3804617-1-anshuman.khandual@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable.h

index 609fd4447b1949e408de658eb72ad522e7658d11..0569b2308fd125321ec78dfd7e940f58eaec752d 100644 (file)
@@ -265,8 +265,7 @@ static inline pte_t pte_mkspecial(pte_t pte)
 
 static inline pte_t pte_mkcont(pte_t pte)
 {
-       pte = set_pte_bit(pte, __pgprot(PTE_CONT));
-       return set_pte_bit(pte, __pgprot(PTE_TYPE_PAGE));
+       return set_pte_bit(pte, __pgprot(PTE_CONT));
 }
 
 static inline pte_t pte_mknoncont(pte_t pte)