Message ID | 20241104041617.3804617-1-anshuman.khandual@arm.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | arm64/mm: Drop setting PTE_TYPE_PAGE in pte_mkcont() | expand |
On Mon, 04 Nov 2024 09:46:17 +0530, Anshuman Khandual wrote: > 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, > which dropped pte_mkhuge() completely, setting back PTE_TYPE_PAGE bits are > no longer necessary. Hence this changes pte_mkcont() to just set PTE_CONT. > > Applied to arm64 (for-next/misc), thanks! [1/1] arm64/mm: Drop setting PTE_TYPE_PAGE in pte_mkcont() https://git.kernel.org/arm64/c/ced841702ee7
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index fa4c32a9f572..17f7fb05e79e 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -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)
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, which dropped pte_mkhuge() completely, setting back PTE_TYPE_PAGE bits are no longer necessary. Hence this changes pte_mkcont() to just set PTE_CONT. Cc: Catalin Marinas <catalin.marinas@arm.com> 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> --- This applies on v6.12-rc6 after applying the earlier arch_make_huge_pte() re-organization patch. https://lore.kernel.org/all/20241029044529.2624785-1-anshuman.khandual@arm.com/ arch/arm64/include/asm/pgtable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)