Current platform specific pxdp_get() helpers are exact same as the default ones defined in the generic MM header (include/linux/pgtable.h) thus making them redundant. Move functions that are now depending on generic helpers to avoid build failure. Cc: “James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Anshuman Khandual --- arch/parisc/include/asm/pgtable.h | 20 +------------------- arch/parisc/mm/init.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 467b8547ac8bf..975aa283b4c13 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h @@ -432,25 +432,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) return pte; } -static inline pte_t ptep_get(pte_t *ptep) -{ - return READ_ONCE(*ptep); -} -#define ptep_get ptep_get - -static inline bool ptep_test_and_clear_young(struct vm_area_struct *vma, - unsigned long addr, pte_t *ptep) -{ - pte_t pte; - - pte = ptep_get(ptep); - if (!pte_young(pte)) { - return false; - } - set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte)); - return true; -} - +bool ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep); bool ptep_clear_flush_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep); pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep); diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index be3380c9bcdae..3da7d8def9435 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -992,3 +992,16 @@ struct execmem_info __init *execmem_arch_setup(void) return &execmem_info; } #endif /* CONFIG_EXECMEM */ + +bool ptep_test_and_clear_young(struct vm_area_struct *vma, + unsigned long addr, pte_t *ptep) +{ + pte_t pte; + + pte = ptep_get(ptep); + if (!pte_young(pte)) + return false; + + set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte)); + return true; +} -- 2.43.0