x86: unify pte_same
Impact: cleanup Unify and demacro pte_same. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
parent
a034a010f4
commit
8de01da35e
|
@ -145,12 +145,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
|
||||||
#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
|
#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __HAVE_ARCH_PTE_SAME
|
|
||||||
static inline int pte_same(pte_t a, pte_t b)
|
|
||||||
{
|
|
||||||
return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bits 0, 6 and 7 are taken in the low part of the pte,
|
* Bits 0, 6 and 7 are taken in the low part of the pte,
|
||||||
* put the 32 bits of offset into the high part.
|
* put the 32 bits of offset into the high part.
|
||||||
|
|
|
@ -434,6 +434,12 @@ static inline int pte_none(pte_t pte)
|
||||||
return !pte.pte;
|
return !pte.pte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define __HAVE_ARCH_PTE_SAME
|
||||||
|
static inline int pte_same(pte_t a, pte_t b)
|
||||||
|
{
|
||||||
|
return a.pte == b.pte;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
|
|
|
@ -134,8 +134,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
|
||||||
native_set_pgd(pgd, native_make_pgd(0));
|
native_set_pgd(pgd, native_make_pgd(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define pte_same(a, b) ((a).pte == (b).pte)
|
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
|
||||||
#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
|
#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
|
||||||
|
|
Loading…
Reference in a new issue