Skip to content

Commit c00ab48

Browse files
committed
MIPS: Remove cpu_has_safe_index_cacheops
Very early versions of the 1004K had an hardware issue that made index cache ops unsafe so they had to be avoided and hit ops be used instead. This may significantly slow down cache maintenance operations. Only very early FPGA versions of the 1004K were affected so let's get rid of the workaround which was only implemented for the DMA cache maintenance operations anyway. Signed-off-by: Ralf Baechle <[email protected]>
1 parent c683ffe commit c00ab48

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

arch/mips/mm/c-r4k.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ static inline void r4k_on_each_cpu(void (*func) (void *info), void *info)
6666
preempt_enable();
6767
}
6868

69-
#if defined(CONFIG_MIPS_CMP) || defined(CONFIG_MIPS_CPS)
70-
#define cpu_has_safe_index_cacheops 0
71-
#else
72-
#define cpu_has_safe_index_cacheops 1
73-
#endif
74-
7569
/*
7670
* Must die.
7771
*/
@@ -744,7 +738,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
744738
* subset property so we have to flush the primary caches
745739
* explicitly
746740
*/
747-
if (cpu_has_safe_index_cacheops && size >= dcache_size) {
741+
if (size >= dcache_size) {
748742
r4k_blast_dcache();
749743
} else {
750744
R4600_HIT_CACHEOP_WAR_IMPL;
@@ -781,7 +775,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
781775
return;
782776
}
783777

784-
if (cpu_has_safe_index_cacheops && size >= dcache_size) {
778+
if (size >= dcache_size) {
785779
r4k_blast_dcache();
786780
} else {
787781
R4600_HIT_CACHEOP_WAR_IMPL;
@@ -861,7 +855,7 @@ static inline void local_r4k_flush_kernel_vmap_range(void *args)
861855
* Aliases only affect the primary caches so don't bother with
862856
* S-caches or T-caches.
863857
*/
864-
if (cpu_has_safe_index_cacheops && size >= dcache_size)
858+
if (size >= dcache_size)
865859
r4k_blast_dcache();
866860
else {
867861
R4600_HIT_CACHEOP_WAR_IMPL;

0 commit comments

Comments
 (0)