Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Add support for the 1074K core.

Signed-off-by: Steven J. Hill <sjhill@mips.com>

+28
+1
arch/mips/include/asm/cpu.h
··· 94 94 #define PRID_IMP_24KE 0x9600 95 95 #define PRID_IMP_74K 0x9700 96 96 #define PRID_IMP_1004K 0x9900 97 + #define PRID_IMP_1074K 0x9a00 97 98 #define PRID_IMP_M14KC 0x9c00 98 99 99 100 /*
+2
arch/mips/include/asm/mipsregs.h
··· 596 596 #define MIPS_CONF4_MMUEXTDEF (_ULCAST_(3) << 14) 597 597 #define MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT (_ULCAST_(1) << 14) 598 598 599 + #define MIPS_CONF6_SYND (_ULCAST_(1) << 13) 600 + 599 601 #define MIPS_CONF7_WII (_ULCAST_(1) << 31) 600 602 601 603 #define MIPS_CONF7_RPS (_ULCAST_(1) << 2)
+4
arch/mips/kernel/cpu-probe.c
··· 857 857 c->cputype = CPU_1004K; 858 858 __cpu_name[cpu] = "MIPS 1004Kc"; 859 859 break; 860 + case PRID_IMP_1074K: 861 + c->cputype = CPU_74K; 862 + __cpu_name[cpu] = "MIPS 1074Kc"; 863 + break; 860 864 } 861 865 862 866 spram_config();
+21
arch/mips/mm/c-r4k.c
··· 786 786 } 787 787 } 788 788 789 + static inline void alias_74k_erratum(struct cpuinfo_mips *c) 790 + { 791 + /* 792 + * Early versions of the 74K do not update the cache tags on a 793 + * vtag miss/ptag hit which can occur in the case of KSEG0/KUSEG 794 + * aliases. In this case it is better to treat the cache as always 795 + * having aliases. 796 + */ 797 + if ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(2, 4, 0)) 798 + c->dcache.flags |= MIPS_CACHE_VTAG; 799 + if ((c->processor_id & 0xff) == PRID_REV_ENCODE_332(2, 4, 0)) 800 + write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); 801 + if (((c->processor_id & 0xff00) == PRID_IMP_1074K) && 802 + ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(1, 1, 0))) { 803 + c->dcache.flags |= MIPS_CACHE_VTAG; 804 + write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); 805 + } 806 + } 807 + 789 808 static char *way_string[] __cpuinitdata = { NULL, "direct mapped", "2-way", 790 809 "3-way", "4-way", "5-way", "6-way", "7-way", "8-way" 791 810 }; ··· 1075 1056 case CPU_34K: 1076 1057 case CPU_74K: 1077 1058 case CPU_1004K: 1059 + if (c->cputype == CPU_74K) 1060 + alias_74k_erratum(c); 1078 1061 if ((read_c0_config7() & (1 << 16))) { 1079 1062 /* effectively physically indexed dcache, 1080 1063 thus no virtual aliases. */