diff options
Diffstat (limited to 'include/asm-s390/pgtable.h')
-rw-r--r-- | include/asm-s390/pgtable.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 1a07028d575e..e965309fedac 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -664,11 +664,13 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
664 | #define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT) | 664 | #define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT) |
665 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 665 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
666 | 666 | ||
667 | #define pmd_page_kernel(pmd) (pmd_val(pmd) & PAGE_MASK) | 667 | #define pmd_page_vaddr(pmd) (pmd_val(pmd) & PAGE_MASK) |
668 | 668 | ||
669 | #define pmd_page(pmd) (mem_map+(pmd_val(pmd) >> PAGE_SHIFT)) | 669 | #define pmd_page(pmd) (mem_map+(pmd_val(pmd) >> PAGE_SHIFT)) |
670 | 670 | ||
671 | #define pgd_page_kernel(pgd) (pgd_val(pgd) & PAGE_MASK) | 671 | #define pgd_page_vaddr(pgd) (pgd_val(pgd) & PAGE_MASK) |
672 | |||
673 | #define pgd_page(pgd) (mem_map+(pgd_val(pgd) >> PAGE_SHIFT)) | ||
672 | 674 | ||
673 | /* to find an entry in a page-table-directory */ | 675 | /* to find an entry in a page-table-directory */ |
674 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) | 676 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
@@ -690,14 +692,14 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | |||
690 | /* Find an entry in the second-level page table.. */ | 692 | /* Find an entry in the second-level page table.. */ |
691 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) | 693 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) |
692 | #define pmd_offset(dir,addr) \ | 694 | #define pmd_offset(dir,addr) \ |
693 | ((pmd_t *) pgd_page_kernel(*(dir)) + pmd_index(addr)) | 695 | ((pmd_t *) pgd_page_vaddr(*(dir)) + pmd_index(addr)) |
694 | 696 | ||
695 | #endif /* __s390x__ */ | 697 | #endif /* __s390x__ */ |
696 | 698 | ||
697 | /* Find an entry in the third-level page table.. */ | 699 | /* Find an entry in the third-level page table.. */ |
698 | #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE-1)) | 700 | #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE-1)) |
699 | #define pte_offset_kernel(pmd, address) \ | 701 | #define pte_offset_kernel(pmd, address) \ |
700 | ((pte_t *) pmd_page_kernel(*(pmd)) + pte_index(address)) | 702 | ((pte_t *) pmd_page_vaddr(*(pmd)) + pte_index(address)) |
701 | #define pte_offset_map(pmd, address) pte_offset_kernel(pmd, address) | 703 | #define pte_offset_map(pmd, address) pte_offset_kernel(pmd, address) |
702 | #define pte_offset_map_nested(pmd, address) pte_offset_kernel(pmd, address) | 704 | #define pte_offset_map_nested(pmd, address) pte_offset_kernel(pmd, address) |
703 | #define pte_unmap(pte) do { } while (0) | 705 | #define pte_unmap(pte) do { } while (0) |