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

MIPS: Add detection of DSP ASE Revision 2.

[ralf@linux-mips.org: This patch really only detects the ASE and passes its
existence on to userland via /proc/cpuinfo. The DSP ASE Rev 2. adds new
resources but no resources that would need management by the kernel.]

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4165/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Steven J. Hill and committed by
Ralf Baechle
ee80f7c7 f59a2d22

+11 -2
+4
arch/mips/include/asm/cpu-features.h
··· 171 171 #define cpu_has_dsp (cpu_data[0].ases & MIPS_ASE_DSP) 172 172 #endif 173 173 174 + #ifndef cpu_has_dsp2 175 + #define cpu_has_dsp2 (cpu_data[0].ases & MIPS_ASE_DSP2P) 176 + #endif 177 + 174 178 #ifndef cpu_has_mipsmt 175 179 #define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT) 176 180 #endif
+1
arch/mips/include/asm/cpu.h
··· 332 332 #define MIPS_ASE_SMARTMIPS 0x00000008 /* SmartMIPS */ 333 333 #define MIPS_ASE_DSP 0x00000010 /* Signal Processing ASE */ 334 334 #define MIPS_ASE_MIPSMT 0x00000020 /* CPU supports MIPS MT */ 335 + #define MIPS_ASE_DSP2P 0x00000040 /* Signal Processing ASE Rev 2 */ 335 336 336 337 337 338 #endif /* _ASM_CPU_H */
+1
arch/mips/include/asm/mipsregs.h
··· 592 592 #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) 593 593 #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) 594 594 #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) 595 + #define MIPS_CONF3_DSP2P (_ULCAST_(1) << 11) 595 596 #define MIPS_CONF3_RXI (_ULCAST_(1) << 12) 596 597 #define MIPS_CONF3_ULRI (_ULCAST_(1) << 13) 597 598
+4 -2
arch/mips/kernel/cpu-probe.c
··· 142 142 143 143 static int __init dsp_disable(char *s) 144 144 { 145 - cpu_data[0].ases &= ~MIPS_ASE_DSP; 145 + cpu_data[0].ases &= ~(MIPS_ASE_DSP | MIPS_ASE_DSP2P); 146 146 mips_dsp_disabled = 1; 147 147 148 148 return 1; ··· 429 429 c->options |= MIPS_CPU_RIXI; 430 430 if (config3 & MIPS_CONF3_DSP) 431 431 c->ases |= MIPS_ASE_DSP; 432 + if (config3 & MIPS_CONF3_DSP2P) 433 + c->ases |= MIPS_ASE_DSP2P; 432 434 if (config3 & MIPS_CONF3_VINT) 433 435 c->options |= MIPS_CPU_VINT; 434 436 if (config3 & MIPS_CONF3_VEIC) ··· 1182 1180 c->options &= ~MIPS_CPU_FPU; 1183 1181 1184 1182 if (mips_dsp_disabled) 1185 - c->ases &= ~MIPS_ASE_DSP; 1183 + c->ases &= ~(MIPS_ASE_DSP | MIPS_ASE_DSP2P); 1186 1184 1187 1185 if (c->options & MIPS_CPU_FPU) { 1188 1186 c->fpu_id = cpu_get_fpu_id();
+1
arch/mips/kernel/proc.c
··· 70 70 cpu_has_mips3d ? " mips3d" : "", 71 71 cpu_has_smartmips ? " smartmips" : "", 72 72 cpu_has_dsp ? " dsp" : "", 73 + cpu_has_dsp2 ? " dsp2" : "", 73 74 cpu_has_mipsmt ? " mt" : "" 74 75 ); 75 76 seq_printf(m, "shadow register sets\t: %d\n",