aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/cpu/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/cpu/cache.c')
-rw-r--r--arch/microblaze/kernel/cpu/cache.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c
index af866a450125..538f1df6761d 100644
--- a/arch/microblaze/kernel/cpu/cache.c
+++ b/arch/microblaze/kernel/cpu/cache.c
@@ -140,7 +140,7 @@ void __invalidate_icache_all(void)
140 /* Just loop through cache size and invalidate, no need to add 140 /* Just loop through cache size and invalidate, no need to add
141 CACHE_BASE address */ 141 CACHE_BASE address */
142 for (i = 0; i < cpuinfo.icache_size; 142 for (i = 0; i < cpuinfo.icache_size;
143 i += cpuinfo.icache_line) 143 i += cpuinfo.icache_line_length)
144 __invalidate_icache(i); 144 __invalidate_icache(i);
145 145
146 __enable_icache(); 146 __enable_icache();
@@ -160,15 +160,15 @@ void __invalidate_icache_range(unsigned long start, unsigned long end)
160 * just cover cache footprint 160 * just cover cache footprint
161 */ 161 */
162 end = min(start + cpuinfo.icache_size, end); 162 end = min(start + cpuinfo.icache_size, end);
163 align = ~(cpuinfo.icache_line - 1); 163 align = ~(cpuinfo.icache_line_length - 1);
164 start &= align; /* Make sure we are aligned */ 164 start &= align; /* Make sure we are aligned */
165 /* Push end up to the next cache line */ 165 /* Push end up to the next cache line */
166 end = ((end & align) + cpuinfo.icache_line); 166 end = ((end & align) + cpuinfo.icache_line_length);
167 167
168 local_irq_save(flags); 168 local_irq_save(flags);
169 __disable_icache(); 169 __disable_icache();
170 170
171 for (i = start; i < end; i += cpuinfo.icache_line) 171 for (i = start; i < end; i += cpuinfo.icache_line_length)
172 __invalidate_icache(i); 172 __invalidate_icache(i);
173 173
174 __enable_icache(); 174 __enable_icache();
@@ -207,7 +207,7 @@ void __invalidate_dcache_all(void)
207 * no need to add CACHE_BASE address 207 * no need to add CACHE_BASE address
208 */ 208 */
209 for (i = 0; i < cpuinfo.dcache_size; 209 for (i = 0; i < cpuinfo.dcache_size;
210 i += cpuinfo.dcache_line) 210 i += cpuinfo.dcache_line_length)
211 __invalidate_dcache(i); 211 __invalidate_dcache(i);
212 212
213 __enable_dcache(); 213 __enable_dcache();
@@ -227,14 +227,14 @@ void __invalidate_dcache_range(unsigned long start, unsigned long end)
227 * just cover cache footprint 227 * just cover cache footprint
228 */ 228 */
229 end = min(start + cpuinfo.dcache_size, end); 229 end = min(start + cpuinfo.dcache_size, end);
230 align = ~(cpuinfo.dcache_line - 1); 230 align = ~(cpuinfo.dcache_line_length - 1);
231 start &= align; /* Make sure we are aligned */ 231 start &= align; /* Make sure we are aligned */
232 /* Push end up to the next cache line */ 232 /* Push end up to the next cache line */
233 end = ((end & align) + cpuinfo.dcache_line); 233 end = ((end & align) + cpuinfo.dcache_line_length);
234 local_irq_save(flags); 234 local_irq_save(flags);
235 __disable_dcache(); 235 __disable_dcache();
236 236
237 for (i = start; i < end; i += cpuinfo.dcache_line) 237 for (i = start; i < end; i += cpuinfo.dcache_line_length)
238 __invalidate_dcache(i); 238 __invalidate_dcache(i);
239 239
240 __enable_dcache(); 240 __enable_dcache();