aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 14:31:09 -0500
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 15:31:50 -0500
commit30f103167fcf2b08de64f5f37ece6bfff7392290 (patch)
tree7e99ef357c99e8663b88fc684a20536bcd451e43
parent3f6cbef1d7f474d16f3a824c6d2910d930778fbd (diff)
x86: unify pgd_bad
Impact: cleanup Unify and demacro pgd_bad. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-rw-r--r--arch/x86/include/asm/pgtable.h5
-rw-r--r--arch/x86/include/asm/pgtable_64.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 0c734e2a90ca..ebcb60e6a961 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -574,6 +574,11 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
574{ 574{
575 return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); 575 return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address);
576} 576}
577
578static inline int pgd_bad(pgd_t pgd)
579{
580 return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
581}
577#endif /* PAGETABLE_LEVELS > 3 */ 582#endif /* PAGETABLE_LEVELS > 3 */
578 583
579#endif /* __ASSEMBLY__ */ 584#endif /* __ASSEMBLY__ */
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index a85ac14df35d..1dfc44932f65 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -154,11 +154,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
154 154
155#ifndef __ASSEMBLY__ 155#ifndef __ASSEMBLY__
156 156
157static inline int pgd_bad(pgd_t pgd)
158{
159 return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
160}
161
162static inline int pud_bad(pud_t pud) 157static inline int pud_bad(pud_t pud)
163{ 158{
164 return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; 159 return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;