aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 14:31:10 -0500
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 15:31:50 -0500
commita61bb29af47b0e4052566d25f3391894306a23fd (patch)
treea1e2db3bbd1eda1e7616d20175d04050fc018156 /arch/x86/include
parent30f103167fcf2b08de64f5f37ece6bfff7392290 (diff)
x86: unify pgd_bad
Impact: cleanup Unify and demacro pgd_bad. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/pgtable-3level.h5
-rw-r--r--arch/x86/include/asm/pgtable.h5
-rw-r--r--arch/x86/include/asm/pgtable_64.h5
3 files changed, 5 insertions, 10 deletions
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 7ad9d05710b1..b92524eec202 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -23,11 +23,6 @@ static inline int pud_none(pud_t pud)
23 return pud_val(pud) == 0; 23 return pud_val(pud) == 0;
24} 24}
25 25
26static inline int pud_bad(pud_t pud)
27{
28 return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
29}
30
31/* Rules for using set_pte: the pte being assigned *must* be 26/* Rules for using set_pte: the pte being assigned *must* be
32 * either not present or in a state where the hardware will 27 * either not present or in a state where the hardware will
33 * not attempt to update the pte. In places where this is 28 * not attempt to update the pte. In places where this is
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index ebcb60e6a961..38882f6cc827 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -546,6 +546,11 @@ static inline int pud_large(pud_t pud)
546 return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) == 546 return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
547 (_PAGE_PSE | _PAGE_PRESENT); 547 (_PAGE_PSE | _PAGE_PRESENT);
548} 548}
549
550static inline int pud_bad(pud_t pud)
551{
552 return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
553}
549#endif /* PAGETABLE_LEVELS > 2 */ 554#endif /* PAGETABLE_LEVELS > 2 */
550 555
551#if PAGETABLE_LEVELS > 3 556#if PAGETABLE_LEVELS > 3
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 1dfc44932f65..fe8be33df3da 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 pud_bad(pud_t pud)
158{
159 return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
160}
161
162static inline int pmd_bad(pmd_t pmd) 157static inline int pmd_bad(pmd_t pmd)
163{ 158{
164 return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; 159 return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;