@@ -187,24 +187,6 @@ static void r4k_blast_dcache_user_page_setup(void)
187
187
188
188
#endif
189
189
190
- static void (* r4k_blast_dcache_page_indexed )(unsigned long addr );
191
-
192
- static void r4k_blast_dcache_page_indexed_setup (void )
193
- {
194
- unsigned long dc_lsize = cpu_dcache_line_size ();
195
-
196
- if (dc_lsize == 0 )
197
- r4k_blast_dcache_page_indexed = (void * )cache_noop ;
198
- else if (dc_lsize == 16 )
199
- r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed ;
200
- else if (dc_lsize == 32 )
201
- r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed ;
202
- else if (dc_lsize == 64 )
203
- r4k_blast_dcache_page_indexed = blast_dcache64_page_indexed ;
204
- else if (dc_lsize == 128 )
205
- r4k_blast_dcache_page_indexed = blast_dcache128_page_indexed ;
206
- }
207
-
208
190
void (* r4k_blast_dcache )(void );
209
191
EXPORT_SYMBOL (r4k_blast_dcache );
210
192
@@ -266,39 +248,6 @@ static inline void tx49_blast_icache32(void)
266
248
addr | ws , 32 );
267
249
}
268
250
269
- static inline void blast_icache32_r4600_v1_page_indexed (unsigned long page )
270
- {
271
- unsigned long flags ;
272
-
273
- local_irq_save (flags );
274
- blast_icache32_page_indexed (page );
275
- local_irq_restore (flags );
276
- }
277
-
278
- static inline void tx49_blast_icache32_page_indexed (unsigned long page )
279
- {
280
- unsigned long indexmask = current_cpu_data .icache .waysize - 1 ;
281
- unsigned long start = INDEX_BASE + (page & indexmask );
282
- unsigned long end = start + PAGE_SIZE ;
283
- unsigned long ws_inc = 1UL << current_cpu_data .icache .waybit ;
284
- unsigned long ws_end = current_cpu_data .icache .ways <<
285
- current_cpu_data .icache .waybit ;
286
- unsigned long ws , addr ;
287
-
288
- CACHE32_UNROLL32_ALIGN2 ;
289
- /* I'm in even chunk. blast odd chunks */
290
- for (ws = 0 ; ws < ws_end ; ws += ws_inc )
291
- for (addr = start + 0x400 ; addr < end ; addr += 0x400 * 2 )
292
- cache_unroll (32 , kernel_cache , Index_Invalidate_I ,
293
- addr | ws , 32 );
294
- CACHE32_UNROLL32_ALIGN ;
295
- /* I'm in odd chunk. blast even chunks */
296
- for (ws = 0 ; ws < ws_end ; ws += ws_inc )
297
- for (addr = start ; addr < end ; addr += 0x400 * 2 )
298
- cache_unroll (32 , kernel_cache , Index_Invalidate_I ,
299
- addr | ws , 32 );
300
- }
301
-
302
251
static void (* r4k_blast_icache_page )(unsigned long addr );
303
252
304
253
static void r4k_blast_icache_page_setup (void )
@@ -341,34 +290,6 @@ static void r4k_blast_icache_user_page_setup(void)
341
290
342
291
#endif
343
292
344
- static void (* r4k_blast_icache_page_indexed )(unsigned long addr );
345
-
346
- static void r4k_blast_icache_page_indexed_setup (void )
347
- {
348
- unsigned long ic_lsize = cpu_icache_line_size ();
349
-
350
- if (ic_lsize == 0 )
351
- r4k_blast_icache_page_indexed = (void * )cache_noop ;
352
- else if (ic_lsize == 16 )
353
- r4k_blast_icache_page_indexed = blast_icache16_page_indexed ;
354
- else if (ic_lsize == 32 ) {
355
- if (IS_ENABLED (CONFIG_WAR_R4600_V1_INDEX_ICACHEOP ) &&
356
- cpu_is_r4600_v1_x ())
357
- r4k_blast_icache_page_indexed =
358
- blast_icache32_r4600_v1_page_indexed ;
359
- else if (IS_ENABLED (CONFIG_WAR_TX49XX_ICACHE_INDEX_INV ))
360
- r4k_blast_icache_page_indexed =
361
- tx49_blast_icache32_page_indexed ;
362
- else if (current_cpu_type () == CPU_LOONGSON2EF )
363
- r4k_blast_icache_page_indexed =
364
- loongson2_blast_icache32_page_indexed ;
365
- else
366
- r4k_blast_icache_page_indexed =
367
- blast_icache32_page_indexed ;
368
- } else if (ic_lsize == 64 )
369
- r4k_blast_icache_page_indexed = blast_icache64_page_indexed ;
370
- }
371
-
372
293
void (* r4k_blast_icache )(void );
373
294
EXPORT_SYMBOL (r4k_blast_icache );
374
295
@@ -414,24 +335,6 @@ static void r4k_blast_scache_page_setup(void)
414
335
r4k_blast_scache_page = blast_scache128_page ;
415
336
}
416
337
417
- static void (* r4k_blast_scache_page_indexed )(unsigned long addr );
418
-
419
- static void r4k_blast_scache_page_indexed_setup (void )
420
- {
421
- unsigned long sc_lsize = cpu_scache_line_size ();
422
-
423
- if (scache_size == 0 )
424
- r4k_blast_scache_page_indexed = (void * )cache_noop ;
425
- else if (sc_lsize == 16 )
426
- r4k_blast_scache_page_indexed = blast_scache16_page_indexed ;
427
- else if (sc_lsize == 32 )
428
- r4k_blast_scache_page_indexed = blast_scache32_page_indexed ;
429
- else if (sc_lsize == 64 )
430
- r4k_blast_scache_page_indexed = blast_scache64_page_indexed ;
431
- else if (sc_lsize == 128 )
432
- r4k_blast_scache_page_indexed = blast_scache128_page_indexed ;
433
- }
434
-
435
338
static void (* r4k_blast_scache )(void );
436
339
437
340
static void r4k_blast_scache_setup (void )
@@ -1807,13 +1710,10 @@ void r4k_cache_init(void)
1807
1710
setup_scache ();
1808
1711
1809
1712
r4k_blast_dcache_page_setup ();
1810
- r4k_blast_dcache_page_indexed_setup ();
1811
1713
r4k_blast_dcache_setup ();
1812
1714
r4k_blast_icache_page_setup ();
1813
- r4k_blast_icache_page_indexed_setup ();
1814
1715
r4k_blast_icache_setup ();
1815
1716
r4k_blast_scache_page_setup ();
1816
- r4k_blast_scache_page_indexed_setup ();
1817
1717
r4k_blast_scache_setup ();
1818
1718
r4k_blast_scache_node_setup ();
1819
1719
#ifdef CONFIG_EVA
0 commit comments