Skip to content

Commit 1692265

Browse files
Anshuman Khandualwilldeacon
authored andcommitted
arm64/mm: Rename pte_mkpresent() as pte_mkvalid()
pte_present() is no longer synonymous with pte_valid() as it also tests for pte_present_invalid() as well. Hence pte_mkpresent() is misleading, because all that does is make an entry mapped, via setting PTE_VALID. Hence rename the helper as pte_mkvalid() which reflects its functionality appropriately. 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> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20250107023016.829416-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 92b6919 commit 1692265

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static inline pte_t pte_mknoncont(pte_t pte)
273273
return clear_pte_bit(pte, __pgprot(PTE_CONT));
274274
}
275275

276-
static inline pte_t pte_mkpresent(pte_t pte)
276+
static inline pte_t pte_mkvalid(pte_t pte)
277277
{
278278
return set_pte_bit(pte, __pgprot(PTE_VALID));
279279
}

arch/arm64/mm/trans_pgd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void _copy_pte(pte_t *dst_ptep, pte_t *src_ptep, unsigned long addr)
5757
*/
5858
BUG_ON(!pfn_valid(pte_pfn(pte)));
5959

60-
__set_pte(dst_ptep, pte_mkpresent(pte_mkwrite_novma(pte)));
60+
__set_pte(dst_ptep, pte_mkvalid(pte_mkwrite_novma(pte)));
6161
}
6262
}
6363

0 commit comments

Comments
 (0)