summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/pgtable.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-07 10:48:05 +0100
committerIngo Molnar <mingo@kernel.org>2017-11-07 10:48:05 +0100
commit783711f0d2458ca1bd716000e767c478cef27144 (patch)
tree0aebe2cfc09cbfa9a18e6a5e8d002489745f45a8 /arch/arm64/include/asm/pgtable.h
parentobjtool: Print top level commands on incorrect usage (diff)
parentMerge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
downloadlinux-783711f0d2458ca1bd716000e767c478cef27144.tar.xz
linux-783711f0d2458ca1bd716000e767c478cef27144.zip
Merge branch 'linus' into core/objtool, to pick up dependent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/pgtable.h')
-rw-r--r--arch/arm64/include/asm/pgtable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index bc4e92337d16..b46e54c2399b 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -401,7 +401,7 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd)
/* Find an entry in the third-level page table. */
#define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-#define pte_offset_phys(dir,addr) (pmd_page_paddr(*(dir)) + pte_index(addr) * sizeof(pte_t))
+#define pte_offset_phys(dir,addr) (pmd_page_paddr(READ_ONCE(*(dir))) + pte_index(addr) * sizeof(pte_t))
#define pte_offset_kernel(dir,addr) ((pte_t *)__va(pte_offset_phys((dir), (addr))))
#define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr))