summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 11:31:08 -0800
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 12:31:50 -0800
commit3f6cbef1d7f474d16f3a824c6d2910d930778fbd (patch)
tree6c49be281129cdbf46ae4b7669fa7faf247bbd5f /arch/x86/include/asm/pgtable.h
parent3fbc2444f465710cdf0c832461a6a14338437453 (diff)
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 c61b37af1f2..0c734e2a90c 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