diff options
-rw-r--r-- | arch/sh/mm/cache-sh3.c | 25 | ||||
-rw-r--r-- | arch/sh/mm/cache.c | 6 |
2 files changed, 21 insertions, 10 deletions
diff --git a/arch/sh/mm/cache-sh3.c b/arch/sh/mm/cache-sh3.c index 6d1dbec08ad4..faef80c98134 100644 --- a/arch/sh/mm/cache-sh3.c +++ b/arch/sh/mm/cache-sh3.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * SIZE: Size of the region. | 32 | * SIZE: Size of the region. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | void __flush_wback_region(void *start, int size) | 35 | static void sh3__flush_wback_region(void *start, int size) |
36 | { | 36 | { |
37 | unsigned long v, j; | 37 | unsigned long v, j; |
38 | unsigned long begin, end; | 38 | unsigned long begin, end; |
@@ -71,7 +71,7 @@ void __flush_wback_region(void *start, int size) | |||
71 | * START: Virtual Address (U0, P1, or P3) | 71 | * START: Virtual Address (U0, P1, or P3) |
72 | * SIZE: Size of the region. | 72 | * SIZE: Size of the region. |
73 | */ | 73 | */ |
74 | void __flush_purge_region(void *start, int size) | 74 | static void sh3__flush_purge_region(void *start, int size) |
75 | { | 75 | { |
76 | unsigned long v; | 76 | unsigned long v; |
77 | unsigned long begin, end; | 77 | unsigned long begin, end; |
@@ -90,11 +90,16 @@ void __flush_purge_region(void *start, int size) | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | /* | 93 | void __init sh3_cache_init(void) |
94 | * No write back please | 94 | { |
95 | * | 95 | __flush_wback_region = sh3__flush_wback_region; |
96 | * Except I don't think there's any way to avoid the writeback. So we | 96 | __flush_purge_region = sh3__flush_purge_region; |
97 | * just alias it to __flush_purge_region(). dwmw2. | 97 | |
98 | */ | 98 | /* |
99 | void __flush_invalidate_region(void *start, int size) | 99 | * No write back please |
100 | __attribute__((alias("__flush_purge_region"))); | 100 | * |
101 | * Except I don't think there's any way to avoid the writeback. | ||
102 | * So we just alias it to sh3__flush_purge_region(). dwmw2. | ||
103 | */ | ||
104 | __flush_invalidate_region = sh3__flush_purge_region; | ||
105 | } | ||
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index b56cce408912..c9480b48c746 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c | |||
@@ -256,6 +256,12 @@ void __init cpu_cache_init(void) | |||
256 | sh2a_cache_init(); | 256 | sh2a_cache_init(); |
257 | } | 257 | } |
258 | 258 | ||
259 | if (boot_cpu_data.family == CPU_FAMILY_SH3) { | ||
260 | extern void __weak sh3_cache_init(void); | ||
261 | |||
262 | sh3_cache_init(); | ||
263 | } | ||
264 | |||
259 | if ((boot_cpu_data.family == CPU_FAMILY_SH4) || | 265 | if ((boot_cpu_data.family == CPU_FAMILY_SH4) || |
260 | (boot_cpu_data.family == CPU_FAMILY_SH4A) || | 266 | (boot_cpu_data.family == CPU_FAMILY_SH4A) || |
261 | (boot_cpu_data.family == CPU_FAMILY_SH4AL_DSP)) { | 267 | (boot_cpu_data.family == CPU_FAMILY_SH4AL_DSP)) { |