summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 20:31:10 +0100
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 21:31:50 +0100
commita61bb29af47b0e4052566d25f3391894306a23fd (patch)
treea1e2db3bbd1eda1e7616d20175d04050fc018156 /arch/x86/include/asm/pgtable.h
parentx86: unify pgd_bad (diff)
downloadlinux-a61bb29af47b0e4052566d25f3391894306a23fd.tar.xz
linux-a61bb29af47b0e4052566d25f3391894306a23fd.zip
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/asm/pgtable.h')
-rw-r--r--arch/x86/include/asm/pgtable.h5
1 files changed, 5 insertions, 0 deletions
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)
return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
(_PAGE_PSE | _PAGE_PRESENT);
}
+
+static inline int pud_bad(pud_t pud)
+{
+ return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
+}
#endif /* PAGETABLE_LEVELS > 2 */
#if PAGETABLE_LEVELS > 3