aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/pgtable-3level.h6
-rw-r--r--arch/x86/include/asm/pgtable.h6
-rw-r--r--arch/x86/include/asm/pgtable_64.h2
3 files changed, 6 insertions, 8 deletions
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 07e0734f620..51832fa0474 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -145,12 +145,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
145#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) 145#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
146#endif 146#endif
147 147
148#define __HAVE_ARCH_PTE_SAME
149static inline int pte_same(pte_t a, pte_t b)
150{
151 return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
152}
153
154/* 148/*
155 * Bits 0, 6 and 7 are taken in the low part of the pte, 149 * Bits 0, 6 and 7 are taken in the low part of the pte,
156 * put the 32 bits of offset into the high part. 150 * put the 32 bits of offset into the high part.
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 841e573b27f..e929d43753c 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -434,6 +434,12 @@ static inline int pte_none(pte_t pte)
434 return !pte.pte; 434 return !pte.pte;
435} 435}
436 436
437#define __HAVE_ARCH_PTE_SAME
438static inline int pte_same(pte_t a, pte_t b)
439{
440 return a.pte == b.pte;
441}
442
437#endif /* __ASSEMBLY__ */ 443#endif /* __ASSEMBLY__ */
438 444
439#ifdef CONFIG_X86_32 445#ifdef CONFIG_X86_32
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 5906a41e849..ff2571865bf 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -134,8 +134,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
134 native_set_pgd(pgd, native_make_pgd(0)); 134 native_set_pgd(pgd, native_make_pgd(0));
135} 135}
136 136
137#define pte_same(a, b) ((a).pte == (b).pte)
138
139#endif /* !__ASSEMBLY__ */ 137#endif /* !__ASSEMBLY__ */
140 138
141#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) 139#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)