diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 14:31:04 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 15:31:49 -0500 |
commit | 3180fba0eec0d14e4ac8183a90d643d0d3383c75 (patch) | |
tree | 02a30fc6a0c96a826e2ad3fb9eb1378edd0c4656 /arch/x86/include | |
parent | bd44d64db1db6acf2dea9ba130b8cb0a54e1dabd (diff) |
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')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_64.h | 2 |
2 files changed, 5 insertions, 2 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) | |||
510 | { | 510 | { |
511 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); | 511 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); |
512 | } | 512 | } |
513 | |||
514 | static inline unsigned long pmd_pfn(pmd_t pmd) | ||
515 | { | ||
516 | return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
517 | } | ||
513 | #endif /* PAGETABLE_LEVELS > 2 */ | 518 | #endif /* PAGETABLE_LEVELS > 2 */ |
514 | 519 | ||
515 | #if PAGETABLE_LEVELS > 3 | 520 | #if PAGETABLE_LEVELS > 3 |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 6cc4133705b9..279ddc6a4eb8 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
@@ -191,8 +191,6 @@ static inline int pud_large(pud_t pte) | |||
191 | } | 191 | } |
192 | 192 | ||
193 | /* PMD - Level 2 access */ | 193 | /* PMD - Level 2 access */ |
194 | #define pmd_pfn(x) ((pmd_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT) | ||
195 | |||
196 | #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) | 194 | #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) |
197 | #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ | 195 | #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ |
198 | _PAGE_FILE }) | 196 | _PAGE_FILE }) |