diff options
Diffstat (limited to 'arch/mips/mm/c-r4k.c')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 857b726f4d41..069803f58f3b 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -578,7 +578,7 @@ static inline void local_r4k_flush_icache_page(void *args) | |||
578 | * secondary cache will result in any entries in the primary caches | 578 | * secondary cache will result in any entries in the primary caches |
579 | * also getting invalidated which hopefully is a bit more economical. | 579 | * also getting invalidated which hopefully is a bit more economical. |
580 | */ | 580 | */ |
581 | if (cpu_has_subset_pcaches) { | 581 | if (cpu_has_inclusive_pcaches) { |
582 | unsigned long addr = (unsigned long) page_address(page); | 582 | unsigned long addr = (unsigned long) page_address(page); |
583 | 583 | ||
584 | r4k_blast_scache_page(addr); | 584 | r4k_blast_scache_page(addr); |
@@ -634,7 +634,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
634 | /* Catch bad driver code */ | 634 | /* Catch bad driver code */ |
635 | BUG_ON(size == 0); | 635 | BUG_ON(size == 0); |
636 | 636 | ||
637 | if (cpu_has_subset_pcaches) { | 637 | if (cpu_has_inclusive_pcaches) { |
638 | if (size >= scache_size) | 638 | if (size >= scache_size) |
639 | r4k_blast_scache(); | 639 | r4k_blast_scache(); |
640 | else | 640 | else |
@@ -662,7 +662,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
662 | /* Catch bad driver code */ | 662 | /* Catch bad driver code */ |
663 | BUG_ON(size == 0); | 663 | BUG_ON(size == 0); |
664 | 664 | ||
665 | if (cpu_has_subset_pcaches) { | 665 | if (cpu_has_inclusive_pcaches) { |
666 | if (size >= scache_size) | 666 | if (size >= scache_size) |
667 | r4k_blast_scache(); | 667 | r4k_blast_scache(); |
668 | else | 668 | else |
@@ -862,15 +862,18 @@ static void __init probe_pcache(void) | |||
862 | break; | 862 | break; |
863 | 863 | ||
864 | case CPU_VR4133: | 864 | case CPU_VR4133: |
865 | write_c0_config(config & ~CONF_EB); | 865 | write_c0_config(config & ~VR41_CONF_P4K); |
866 | case CPU_VR4131: | 866 | case CPU_VR4131: |
867 | /* Workaround for cache instruction bug of VR4131 */ | 867 | /* Workaround for cache instruction bug of VR4131 */ |
868 | if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U || | 868 | if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U || |
869 | c->processor_id == 0x0c82U) { | 869 | c->processor_id == 0x0c82U) { |
870 | config &= ~0x00000030U; | 870 | config |= 0x00400000U; |
871 | config |= 0x00410000U; | 871 | if (c->processor_id == 0x0c80U) |
872 | config |= VR41_CONF_BP; | ||
872 | write_c0_config(config); | 873 | write_c0_config(config); |
873 | } | 874 | } else |
875 | c->options |= MIPS_CPU_CACHE_CDEX_P; | ||
876 | |||
874 | icache_size = 1 << (10 + ((config & CONF_IC) >> 9)); | 877 | icache_size = 1 << (10 + ((config & CONF_IC) >> 9)); |
875 | c->icache.linesz = 16 << ((config & CONF_IB) >> 5); | 878 | c->icache.linesz = 16 << ((config & CONF_IB) >> 5); |
876 | c->icache.ways = 2; | 879 | c->icache.ways = 2; |
@@ -880,8 +883,6 @@ static void __init probe_pcache(void) | |||
880 | c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); | 883 | c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); |
881 | c->dcache.ways = 2; | 884 | c->dcache.ways = 2; |
882 | c->dcache.waybit = __ffs(dcache_size/2); | 885 | c->dcache.waybit = __ffs(dcache_size/2); |
883 | |||
884 | c->options |= MIPS_CPU_CACHE_CDEX_P; | ||
885 | break; | 886 | break; |
886 | 887 | ||
887 | case CPU_VR41XX: | 888 | case CPU_VR41XX: |
@@ -1192,7 +1193,7 @@ static void __init setup_scache(void) | |||
1192 | printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n", | 1193 | printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n", |
1193 | scache_size >> 10, way_string[c->scache.ways], c->scache.linesz); | 1194 | scache_size >> 10, way_string[c->scache.ways], c->scache.linesz); |
1194 | 1195 | ||
1195 | c->options |= MIPS_CPU_SUBSET_CACHES; | 1196 | c->options |= MIPS_CPU_INCLUSIVE_CACHES; |
1196 | } | 1197 | } |
1197 | 1198 | ||
1198 | void au1x00_fixup_config_od(void) | 1199 | void au1x00_fixup_config_od(void) |