diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2020-06-15 14:57:58 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-06-20 14:14:53 +0200 |
commit | 481e980a7c199c5a4634fd7ea308067dd4ba75fa (patch) | |
tree | 8cb8ccaf80bd171a3745a034ac6647fc2865eeba /include/asm-generic | |
parent | mm/gup: Use huge_ptep_get() in gup_hugepte() (diff) | |
download | linux-481e980a7c199c5a4634fd7ea308067dd4ba75fa.tar.xz linux-481e980a7c199c5a4634fd7ea308067dd4ba75fa.zip |
mm: Allow arches to provide ptep_get()
Since commit 9e343b467c70 ("READ_ONCE: Enforce atomicity for
{READ,WRITE}_ONCE() memory accesses") it is not possible anymore to
use READ_ONCE() to access complex page table entries like the one
defined for powerpc 8xx with 16k size pages.
Define a ptep_get() helper that architectures can override instead
of performing a READ_ONCE() on the page table entry pointer.
Fixes: 9e343b467c70 ("READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/087fa12b6e920e32315136b998aa834f99242695.1592225558.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/hugetlb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h index 40f85decc2ee..8e1e6244a89d 100644 --- a/include/asm-generic/hugetlb.h +++ b/include/asm-generic/hugetlb.h @@ -122,7 +122,7 @@ static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, #ifndef __HAVE_ARCH_HUGE_PTEP_GET static inline pte_t huge_ptep_get(pte_t *ptep) { - return READ_ONCE(*ptep); + return ptep_get(ptep); } #endif |