diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 14:31:05 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 15:31:50 -0500 |
commit | 97e2817d3423d753fd2f80ea936a370032846382 (patch) | |
tree | 1f33067bf362f5a39c50bb5b75bba951bfb49963 /arch/x86/include/asm/pgtable.h | |
parent | 3180fba0eec0d14e4ac8183a90d643d0d3383c75 (diff) |
x86: unify pmd_pfn
Impact: cleanup
Unify pmd_pfn. Unfortunately it can't be demacroed because it has a
cyclic dependency on linux/mm.h:page_to_nid().
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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 532144c2f1cc..49b5cff78c28 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -489,6 +489,15 @@ static inline unsigned pmd_index(unsigned long address) | |||
489 | return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1); | 489 | return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1); |
490 | } | 490 | } |
491 | 491 | ||
492 | /* | ||
493 | * Conversion functions: convert a page and protection to a page entry, | ||
494 | * and a page entry and page directory to the page they refer to. | ||
495 | * | ||
496 | * (Currently stuck as a macro because of indirect forward reference | ||
497 | * to linux/mm.h:page_to_nid()) | ||
498 | */ | ||
499 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | ||
500 | |||
492 | #if PAGETABLE_LEVELS > 2 | 501 | #if PAGETABLE_LEVELS > 2 |
493 | static inline int pud_present(pud_t pud) | 502 | static inline int pud_present(pud_t pud) |
494 | { | 503 | { |