diff options
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/cacheflush.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 8 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_64.h | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/arch/sh/include/asm/cacheflush.h b/arch/sh/include/asm/cacheflush.h index 11e416630585..c29918f3c819 100644 --- a/arch/sh/include/asm/cacheflush.h +++ b/arch/sh/include/asm/cacheflush.h | |||
@@ -85,7 +85,7 @@ extern void copy_from_user_page(struct vm_area_struct *vma, | |||
85 | 85 | ||
86 | void kmap_coherent_init(void); | 86 | void kmap_coherent_init(void); |
87 | void *kmap_coherent(struct page *page, unsigned long addr); | 87 | void *kmap_coherent(struct page *page, unsigned long addr); |
88 | void kunmap_coherent(void); | 88 | void kunmap_coherent(void *kvaddr); |
89 | 89 | ||
90 | #define PG_dcache_dirty PG_arch_1 | 90 | #define PG_dcache_dirty PG_arch_1 |
91 | 91 | ||
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index 4c4429cda56d..c0d359ce337b 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -408,13 +408,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
408 | 408 | ||
409 | /* to find an entry in a page-table-directory. */ | 409 | /* to find an entry in a page-table-directory. */ |
410 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) | 410 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
411 | #define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) | 411 | #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) |
412 | #define __pgd_offset(address) pgd_index(address) | ||
412 | 413 | ||
413 | /* to find an entry in a kernel page-table-directory */ | 414 | /* to find an entry in a kernel page-table-directory */ |
414 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) | 415 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) |
415 | 416 | ||
417 | #define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) | ||
418 | #define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) | ||
419 | |||
416 | /* Find an entry in the third-level page table.. */ | 420 | /* Find an entry in the third-level page table.. */ |
417 | #define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 421 | #define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
422 | #define __pte_offset(address) pte_index(address) | ||
423 | |||
418 | #define pte_offset_kernel(dir, address) \ | 424 | #define pte_offset_kernel(dir, address) \ |
419 | ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address)) | 425 | ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address)) |
420 | #define pte_offset_map(dir, address) pte_offset_kernel(dir, address) | 426 | #define pte_offset_map(dir, address) pte_offset_kernel(dir, address) |
diff --git a/arch/sh/include/asm/pgtable_64.h b/arch/sh/include/asm/pgtable_64.h index c78990cda557..17cdbecc3adc 100644 --- a/arch/sh/include/asm/pgtable_64.h +++ b/arch/sh/include/asm/pgtable_64.h | |||
@@ -60,6 +60,9 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep) | |||
60 | /* To find an entry in a kernel PGD. */ | 60 | /* To find an entry in a kernel PGD. */ |
61 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) | 61 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) |
62 | 62 | ||
63 | #define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) | ||
64 | #define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) | ||
65 | |||
63 | /* | 66 | /* |
64 | * PMD level access routines. Same notes as above. | 67 | * PMD level access routines. Same notes as above. |
65 | */ | 68 | */ |
@@ -80,6 +83,8 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep) | |||
80 | #define pte_index(address) \ | 83 | #define pte_index(address) \ |
81 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 84 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
82 | 85 | ||
86 | #define __pte_offset(address) pte_index(address) | ||
87 | |||
83 | #define pte_offset_kernel(dir, addr) \ | 88 | #define pte_offset_kernel(dir, addr) \ |
84 | ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr))) | 89 | ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr))) |
85 | 90 | ||