diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2009-06-27 02:35:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-29 00:14:42 -0400 |
commit | 087975b06b00af9bf888fab6f94ae113c5cd80bd (patch) | |
tree | 6777365836ff739c9ab07963a01c4a844450532a /arch/x86/include/asm/pgtable.h | |
parent | 9a8fb9ee7a80f5280388b98dc7636d537866fa72 (diff) |
x86: Clean up dump_pagetable()
Use pgtable access helpers for 32-bit version dump_pagetable()
and get rid of __typeof__() operators. This needs to make
pmd_pfn() available for 2-level pgtable.
Also, remove some casts for 64-bit version dump_pagetable().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090627063514.GA2834@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 3cc06e3fceb8..af5481e94863 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -134,6 +134,11 @@ static inline unsigned long pte_pfn(pte_t pte) | |||
134 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; | 134 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; |
135 | } | 135 | } |
136 | 136 | ||
137 | static inline unsigned long pmd_pfn(pmd_t pmd) | ||
138 | { | ||
139 | return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
140 | } | ||
141 | |||
137 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | 142 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) |
138 | 143 | ||
139 | static inline int pmd_large(pmd_t pte) | 144 | static inline int pmd_large(pmd_t pte) |
@@ -422,11 +427,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) | |||
422 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); | 427 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); |
423 | } | 428 | } |
424 | 429 | ||
425 | static inline unsigned long pmd_pfn(pmd_t pmd) | ||
426 | { | ||
427 | return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
428 | } | ||
429 | |||
430 | static inline int pud_large(pud_t pud) | 430 | static inline int pud_large(pud_t pud) |
431 | { | 431 | { |
432 | return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) == | 432 | return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) == |