x86: unify pud_large
Impact: cleanup
Unify and demacro pud_large.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index c61b37a..0c734e2 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -540,6 +540,12 @@
{
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