aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/pgtable-3level.h3
-rw-r--r--arch/x86/include/asm/pgtable.h5
-rw-r--r--arch/x86/include/asm/pgtable_64.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 524bd91b9952..542616ac192a 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -117,9 +117,6 @@ static inline void pud_clear(pud_t *pudp)
117 117
118#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT) 118#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
119 119
120#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
121
122
123/* Find an entry in the second-level page table.. */ 120/* Find an entry in the second-level page table.. */
124#define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \ 121#define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \
125 pmd_index(address)) 122 pmd_index(address))
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index cca4321e0760..4638b4af6750 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -462,6 +462,11 @@ static inline int pud_present(pud_t pud)
462{ 462{
463 return pud_val(pud) & _PAGE_PRESENT; 463 return pud_val(pud) & _PAGE_PRESENT;
464} 464}
465
466static inline unsigned long pud_page_vaddr(pud_t pud)
467{
468 return (unsigned long)__va((unsigned long)pud_val(pud) & PTE_PFN_MASK);
469}
465#endif /* PAGETABLE_LEVELS > 2 */ 470#endif /* PAGETABLE_LEVELS > 2 */
466 471
467#if PAGETABLE_LEVELS > 3 472#if PAGETABLE_LEVELS > 3
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 4f8dbb99b692..9875e40c058d 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -185,8 +185,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
185 185
186/* PUD - Level3 access */ 186/* PUD - Level3 access */
187/* to find an entry in a page-table-directory. */ 187/* to find an entry in a page-table-directory. */
188#define pud_page_vaddr(pud) \
189 ((unsigned long)__va(pud_val((pud)) & PHYSICAL_PAGE_MASK))
190#define pud_page(pud) (pfn_to_page(pud_val((pud)) >> PAGE_SHIFT)) 188#define pud_page(pud) (pfn_to_page(pud_val((pud)) >> PAGE_SHIFT))
191#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1)) 189#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
192#define pud_offset(pgd, address) \ 190#define pud_offset(pgd, address) \