lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 02 of 36] x86: unify pte_same
Date
From
Impact: cleanup

Unify and demacro pte_same.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
arch/x86/include/asm/pgtable-3level.h | 6 ------
arch/x86/include/asm/pgtable.h | 6 ++++++
arch/x86/include/asm/pgtable_64.h | 2 --
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
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -145,12 +145,6 @@
#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
#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,
* 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
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -462,6 +462,12 @@
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__ */

#ifdef CONFIG_X86_32
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -133,8 +133,6 @@
native_set_pgd(pgd, native_make_pgd(0));
}

-#define pte_same(a, b) ((a).pte == (b).pte)
-
#endif /* !__ASSEMBLY__ */

#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)



\
 
 \ /
  Last update: 2009-02-05 20:35    [from the cache]
©2003-2011 Jasper Spaans