]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/include/asm/pgtable.h
x86: unify pages_to_mb
[linux-2.6-omap-h63xx.git] / arch / x86 / include / asm / pgtable.h
index 72bf53ef60bf5bc9b990b3b4efe362114f3e9f00..d4cbc8188c8ac351b6849243cf6fd78608876d7e 100644 (file)
@@ -519,6 +519,11 @@ static inline int pmd_bad(pmd_t pmd)
        return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
 }
 
+static inline unsigned long pages_to_mb(unsigned long npg)
+{
+       return npg >> (20 - PAGE_SHIFT);
+}
+
 #if PAGETABLE_LEVELS > 2
 static inline int pud_present(pud_t pud)
 {