]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
MIPS: Detect DSP v3 support
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Tue, 29 Mar 2016 14:50:25 +0000 (15:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:01:57 +0000 (14:01 +0200)
DSPv3 is supported on all MIPSr6 systems which indicate support for DSPv2.

This doesn't require any changes to the kernel's handling of DSP
resources. The patch is to detect support and indicate it in /proc/cpuinfo

DSP v3 introduces a new instruction BPOSGE32C

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12918/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/cpu.h
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/proc.c

index 57cdc5be95450dcc8af7bbe088e2a90e2c5ad42e..6ff0504d090df25bfbeb8247199c2b1e89d9beab 100644 (file)
 #define cpu_has_dsp2           (cpu_data[0].ases & MIPS_ASE_DSP2P)
 #endif
 
+#ifndef cpu_has_dsp3
+#define cpu_has_dsp3           (cpu_data[0].ases & MIPS_ASE_DSP3)
+#endif
+
 #ifndef cpu_has_mipsmt
 #define cpu_has_mipsmt         (cpu_data[0].ases & MIPS_ASE_MIPSMT)
 #endif
index cc579a6c8016bcd670e2a380680f208f42a1d6a7..9127a583d1f1348d804ba1960f372ab93adb369b 100644 (file)
@@ -413,5 +413,6 @@ enum cpu_type_enum {
 #define MIPS_ASE_DSP2P         0x00000040 /* Signal Processing ASE Rev 2 */
 #define MIPS_ASE_VZ            0x00000080 /* Virtualization ASE */
 #define MIPS_ASE_MSA           0x00000100 /* MIPS SIMD Architecture */
+#define MIPS_ASE_DSP3          0x00000200 /* Signal Processing ASE Rev 3*/
 
 #endif /* _ASM_CPU_H */
index 785e9a11c721fb6bfcc04966eb8b1697245304b2..d0818aab00e2695296add472546f097620edd785 100644 (file)
@@ -680,8 +680,11 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
                c->options |= MIPS_CPU_RIXI;
        if (config3 & MIPS_CONF3_DSP)
                c->ases |= MIPS_ASE_DSP;
-       if (config3 & MIPS_CONF3_DSP2P)
+       if (config3 & MIPS_CONF3_DSP2P) {
                c->ases |= MIPS_ASE_DSP2P;
+               if (cpu_has_mips_r6)
+                       c->ases |= MIPS_ASE_DSP3;
+       }
        if (config3 & MIPS_CONF3_VINT)
                c->options |= MIPS_CPU_VINT;
        if (config3 & MIPS_CONF3_VEIC)
index 298b2b773d12ba8f875d2d0e253ba19a60f93e2c..97dc01b03631196252c118f592e58e7b41bca428 100644 (file)
@@ -114,6 +114,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
        if (cpu_has_smartmips)  seq_printf(m, "%s", " smartmips");
        if (cpu_has_dsp)        seq_printf(m, "%s", " dsp");
        if (cpu_has_dsp2)       seq_printf(m, "%s", " dsp2");
+       if (cpu_has_dsp3)       seq_printf(m, "%s", " dsp3");
        if (cpu_has_mipsmt)     seq_printf(m, "%s", " mt");
        if (cpu_has_mmips)      seq_printf(m, "%s", " micromips");
        if (cpu_has_vz)         seq_printf(m, "%s", " vz");