Skip to content

Commit dba9548

Browse files
Anshuman Khandualctmarinas
authored andcommitted
arm64/mm: Clear PXX_TYPE_MASK in mk_[pmd|pud]_sect_prot()
Clear PXX_TYPE_MASK bits in mk_[pmd|pud]_sect_prot() while creating section mappings instead of just clearing the PXX_TABLE_BIT. 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/20250221044227.1145393-4-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent f5e9381 commit dba9548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,12 @@ static inline pmd_t pte_pmd(pte_t pte)
483483

484484
static inline pgprot_t mk_pud_sect_prot(pgprot_t prot)
485485
{
486-
return __pgprot((pgprot_val(prot) & ~PUD_TABLE_BIT) | PUD_TYPE_SECT);
486+
return __pgprot((pgprot_val(prot) & ~PUD_TYPE_MASK) | PUD_TYPE_SECT);
487487
}
488488

489489
static inline pgprot_t mk_pmd_sect_prot(pgprot_t prot)
490490
{
491-
return __pgprot((pgprot_val(prot) & ~PMD_TABLE_BIT) | PMD_TYPE_SECT);
491+
return __pgprot((pgprot_val(prot) & ~PMD_TYPE_MASK) | PMD_TYPE_SECT);
492492
}
493493

494494
static inline pte_t pte_swp_mkexclusive(pte_t pte)

0 commit comments

Comments
 (0)