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 <[email protected]> Cc: Will Deacon <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Mark Rutland <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Anshuman Khandual <[email protected]> Acked-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
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)