]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: unify pte_none
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 5 Feb 2009 19:30:43 +0000 (11:30 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Fri, 6 Feb 2009 20:26:08 +0000 (12:26 -0800)
Impact: cleanup

Unify and demacro pte_none.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/include/asm/pgtable-2level.h
arch/x86/include/asm/pgtable-3level.h
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_64.h

index e0d199fe1d83896578421d79aac509ebd843fdf3..c1774ac9da7a90f30dd47da6ac99e7b9b98494fd 100644 (file)
@@ -53,8 +53,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
 #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
 #endif
 
-#define pte_none(x)            (!(x).pte_low)
-
 /*
  * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken,
  * split up the 29 bits of offset into this range:
index 447da43cddb360a6f92a2ce98896599359546e6d..07e0734f62029d4321293ff25588d166b0dafb3d 100644 (file)
@@ -151,11 +151,6 @@ static inline int pte_same(pte_t a, pte_t b)
        return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
 }
 
-static inline int pte_none(pte_t pte)
-{
-       return !pte.pte_low && !pte.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.
index 06bbcbd66e9c508285020b65c6d411afd2bfe59b..841e573b27fe3b69872a467162fb02498f22382e 100644 (file)
@@ -429,6 +429,11 @@ static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
 }
 #endif /* CONFIG_PARAVIRT */
 
+static inline int pte_none(pte_t pte)
+{
+       return !pte.pte;
+}
+
 #endif /* __ASSEMBLY__ */
 
 #ifdef CONFIG_X86_32
index ba09289accaa0322c70fb580a40f83677a900c9f..5906a41e8492b11edd13fe4d0e7e5bacbec04f99 100644 (file)
@@ -171,7 +171,6 @@ static inline int pmd_bad(pmd_t pmd)
        return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
 }
 
-#define pte_none(x)    (!pte_val((x)))
 #define pte_present(x) (pte_val((x)) & (_PAGE_PRESENT | _PAGE_PROTNONE))
 
 #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))   /* FIXME: is this right? */