aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2016-05-05 05:44:00 -0400
committerWill Deacon <will.deacon@arm.com>2016-05-06 07:46:53 -0400
commit282aa7051b0169991b34716f0f22d9c2f59c46c4 (patch)
treeda65f6f3769496314d842b1ff36b07f0b9ba2c1b
parent911f56eeb87ee378f5e215469268a7a2f68a5a8a (diff)
arm64: Implement pmdp_set_access_flags() for hardware AF/DBM
The update to the accessed or dirty states for block mappings must be done atomically on hardware with support for automatic AF/DBM. The ptep_set_access_flags() function has been fixed as part of commit 66dbd6e61a52 ("arm64: Implement ptep_set_access_flags() for hardware AF/DBM"). This patch brings pmdp_set_access_flags() in line with the pte counterpart. Fixes: 2f4b829c625e ("arm64: Add support for hardware updates of the access and dirty pte bits") Cc: <stable@vger.kernel.org> # 4.4.x: 66dbd6e61a52: arm64: Implement ptep_set_access_flags() for hardware AF/DBM Cc: <stable@vger.kernel.org> # 4.3+ Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/include/asm/pgtable.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index b0ad16f05bcc..072c335d4786 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -540,6 +540,16 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma,
540 unsigned long address, pte_t *ptep, 540 unsigned long address, pte_t *ptep,
541 pte_t entry, int dirty); 541 pte_t entry, int dirty);
542 542
543#ifdef CONFIG_TRANSPARENT_HUGEPAGE
544#define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
545static inline int pmdp_set_access_flags(struct vm_area_struct *vma,
546 unsigned long address, pmd_t *pmdp,
547 pmd_t entry, int dirty)
548{
549 return ptep_set_access_flags(vma, address, (pte_t *)pmdp, pmd_pte(entry), dirty);
550}
551#endif
552
543/* 553/*
544 * Atomic pte/pmd modifications. 554 * Atomic pte/pmd modifications.
545 */ 555 */