Skip to content

Commit de7fb8d

Browse files
Anshuman Khandualctmarinas
authored andcommitted
arm64/mm: Change protval as 'pteval_t' in map_range()
pgprot_t has been defined as an encapsulated structure with pteval_t as its element. Hence it is prudent to use pteval_t as the type instead of via the size based u64. Besides pteval_t type might be different size later on with FEAT_D128. 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> Reviewed-by: Gavin Shan <gshan@redhat.com> Link: https://lore.kernel.org/r/20241111075249.609493-1-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent bdf9483 commit de7fb8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/pi/map_range.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void __init map_range(u64 *pte, u64 start, u64 end, u64 pa, pgprot_t prot,
3030
int level, pte_t *tbl, bool may_use_cont, u64 va_offset)
3131
{
3232
u64 cmask = (level == 3) ? CONT_PTE_SIZE - 1 : U64_MAX;
33-
u64 protval = pgprot_val(prot) & ~PTE_TYPE_MASK;
33+
pteval_t protval = pgprot_val(prot) & ~PTE_TYPE_MASK;
3434
int lshift = (3 - level) * (PAGE_SHIFT - 3);
3535
u64 lmask = (PAGE_SIZE << lshift) - 1;
3636

0 commit comments

Comments
 (0)