History

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.

Christophe Leroy committed 6 years ago

Commit 481e9801 parent 55ca2263 files · +9 −2Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/pgtable.h+7−0
@@ -249,6 +249,13 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, · 248 unmodified lines
249}249}
250#endif250#endif
251 251
252#ifndef __HAVE_ARCH_PTEP_GET
253static inline pte_t ptep_get(pte_t *ptep)
254{
255 return READ_ONCE(*ptep);
256}
257#endif
258
252#ifdef CONFIG_TRANSPARENT_HUGEPAGE259#ifdef CONFIG_TRANSPARENT_HUGEPAGE
253#ifndef __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR260#ifndef __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR
254static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,261static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,