summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 20:31:08 +0100
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 21:31:50 +0100
commit3f6cbef1d7f474d16f3a824c6d2910d930778fbd (patch)
tree6c49be281129cdbf46ae4b7669fa7faf247bbd5f /arch/x86/include/asm/pgtable.h
parentx86: unify pte_offset_kernel (diff)
downloadlinux-3f6cbef1d7f474d16f3a824c6d2910d930778fbd.tar.xz
linux-3f6cbef1d7f474d16f3a824c6d2910d930778fbd.zip
x86: unify pud_large
Impact: cleanup Unify and demacro pud_large. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index c61b37af1f28..0c734e2a90ca 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -540,6 +540,12 @@ static inline unsigned long pmd_pfn(pmd_t pmd)
{
return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
}
+
+static inline int pud_large(pud_t pud)
+{
+ return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
+ (_PAGE_PSE | _PAGE_PRESENT);
+}
#endif /* PAGETABLE_LEVELS > 2 */
#if PAGETABLE_LEVELS > 3