MIPS: Correct ISA masking in FPU feature determination
[firefly-linux-kernel-4.4.55.git] / arch / mips / kernel / cpu-probe.c
index 2f8fe8d4c7ca4c0d8385f369dcf0a461cb0f5889..f8481ce7bbb17b281d25cc5e5311f6ffdf9a1e16 100644 (file)
@@ -1374,7 +1374,9 @@ void cpu_probe(void)
        if (c->options & MIPS_CPU_FPU) {
                c->fpu_id = cpu_get_fpu_id();
 
-               if (c->isa_level & cpu_has_mips_r) {
+               if (c->isa_level & (MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M64R1 |
+                                   MIPS_CPU_ISA_M32R2 | MIPS_CPU_ISA_M64R2 |
+                                   MIPS_CPU_ISA_M32R6 | MIPS_CPU_ISA_M64R6)) {
                        if (c->fpu_id & MIPS_FPIR_3D)
                                c->ases |= MIPS_ASE_MIPS3D;
                        if (c->fpu_id & MIPS_FPIR_FREP)