From: Yu Zhao Date: Wed, 4 Aug 2021 07:31:34 +0000 (-0600) Subject: pgtable: add arch_has_hw_pte_young() fallback X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f002ba070982016a804e0d7d54d91134d94dc190;p=platform%2Fkernel%2Flinux-rpi.git pgtable: add arch_has_hw_pte_young() fallback Change-Id: Ie771d5cdd3044cbc4c9918fc1dace1ceb0358ed7 Signed-off-by: Marek Szyprowski --- diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 660b70c..e5d4e2b 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -121,6 +121,19 @@ static inline int pmdp_clear_flush_young(struct vm_area_struct *vma, #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #endif +#ifndef arch_has_hw_pte_young +/* + * Return whether the accessed bit is supported on the local CPU. + * + * This stub assumes accessing through an old PTE triggers a page fault. + * Architectures that automatically set the access bit should overwrite it. + */ +static inline bool arch_has_hw_pte_young(void) +{ + return false; +} +#endif + #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long address,