summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 20:31:04 +0100
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 21:31:49 +0100
commit3180fba0eec0d14e4ac8183a90d643d0d3383c75 (patch)
tree02a30fc6a0c96a826e2ad3fb9eb1378edd0c4656 /arch/x86/include/asm/pgtable.h
parentx86: remove redundant pfn_pmd definition (diff)
downloadlinux-3180fba0eec0d14e4ac8183a90d643d0d3383c75.tar.xz
linux-3180fba0eec0d14e4ac8183a90d643d0d3383c75.zip
x86: unify pmd_pfn
Impact: cleanup Unify and demacro pmd_pfn. 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 a7dbb05075d2..532144c2f1cc 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -510,6 +510,11 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
{
return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
}
+
+static inline unsigned long pmd_pfn(pmd_t pmd)
+{
+ return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
+}
#endif /* PAGETABLE_LEVELS > 2 */
#if PAGETABLE_LEVELS > 3