diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-02-13 06:14:10 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-02-14 00:22:12 -0500 |
commit | 38350e0a00f973dd9c6556beeff0f7eb5ef3f58b (patch) | |
tree | a419a9c9b45a6cb20a2f4f809f628c10a3ce9ab9 /include/asm-sh | |
parent | 5c8f82c64941594cdab53bf9f9a66c190781f4f6 (diff) |
sh: Get SH-5 caches working again post-unification.
A number of cleanups to get the SH-5 cache management code in line with
the rest of the SH backend.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/cpu-sh5/cacheflush.h | 4 | ||||
-rw-r--r-- | include/asm-sh/mmu_context_64.h | 3 | ||||
-rw-r--r-- | include/asm-sh/page.h | 7 |
3 files changed, 9 insertions, 5 deletions
diff --git a/include/asm-sh/cpu-sh5/cacheflush.h b/include/asm-sh/cpu-sh5/cacheflush.h index f935acbacf38..5a11f0b7e66a 100644 --- a/include/asm-sh/cpu-sh5/cacheflush.h +++ b/include/asm-sh/cpu-sh5/cacheflush.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | #include <asm/page.h> | ||
7 | |||
8 | struct vm_area_struct; | 6 | struct vm_area_struct; |
9 | struct page; | 7 | struct page; |
10 | struct mm_struct; | 8 | struct mm_struct; |
@@ -27,7 +25,7 @@ extern void flush_icache_user_range(struct vm_area_struct *vma, | |||
27 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 25 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
28 | 26 | ||
29 | #define flush_icache_page(vma, page) do { } while (0) | 27 | #define flush_icache_page(vma, page) do { } while (0) |
30 | #define p3_cache_init() do { } while (0) | 28 | void p3_cache_init(void); |
31 | 29 | ||
32 | #endif /* __ASSEMBLY__ */ | 30 | #endif /* __ASSEMBLY__ */ |
33 | 31 | ||
diff --git a/include/asm-sh/mmu_context_64.h b/include/asm-sh/mmu_context_64.h index 020be744b088..9649f1c07caf 100644 --- a/include/asm-sh/mmu_context_64.h +++ b/include/asm-sh/mmu_context_64.h | |||
@@ -66,6 +66,9 @@ static inline void set_asid(unsigned long asid) | |||
66 | : "=r" (sr), "=r" (pc) : "0" (sr)); | 66 | : "=r" (sr), "=r" (pc) : "0" (sr)); |
67 | } | 67 | } |
68 | 68 | ||
69 | /* arch/sh/kernel/cpu/sh5/entry.S */ | ||
70 | extern unsigned long switch_and_save_asid(unsigned long new_asid); | ||
71 | |||
69 | /* No spare register to twiddle, so use a software cache */ | 72 | /* No spare register to twiddle, so use a software cache */ |
70 | extern pgd_t *mmu_pdtp_cache; | 73 | extern pgd_t *mmu_pdtp_cache; |
71 | 74 | ||
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 134562dc8c45..304c30b5d947 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -55,11 +55,14 @@ extern void clear_page(void *to); | |||
55 | extern void copy_page(void *to, void *from); | 55 | extern void copy_page(void *to, void *from); |
56 | 56 | ||
57 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ | 57 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ |
58 | (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) | 58 | (defined(CONFIG_CPU_SH5) || defined(CONFIG_CPU_SH4) || \ |
59 | defined(CONFIG_SH7705_CACHE_32KB)) | ||
59 | struct page; | 60 | struct page; |
60 | struct vm_area_struct; | 61 | struct vm_area_struct; |
61 | extern void clear_user_page(void *to, unsigned long address, struct page *page); | 62 | extern void clear_user_page(void *to, unsigned long address, struct page *page); |
62 | #ifdef CONFIG_CPU_SH4 | 63 | extern void copy_user_page(void *to, void *from, unsigned long address, |
64 | struct page *page); | ||
65 | #if defined(CONFIG_CPU_SH4) | ||
63 | extern void copy_user_highpage(struct page *to, struct page *from, | 66 | extern void copy_user_highpage(struct page *to, struct page *from, |
64 | unsigned long vaddr, struct vm_area_struct *vma); | 67 | unsigned long vaddr, struct vm_area_struct *vma); |
65 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | 68 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE |