]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/mips/kernel/cpu-probe.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[karo-tx-linux.git] / arch / mips / kernel / cpu-probe.c
index 12422fd4af2335dab2f90f1b0b47684a5b08e377..1aba27786bd5ae6cc38784c0f05f196745e1cd3d 100644 (file)
@@ -34,6 +34,7 @@
 
 /* Hardware capabilities */
 unsigned int elf_hwcap __read_mostly;
+EXPORT_SYMBOL_GPL(elf_hwcap);
 
 /*
  * Get the FPU Implementation/Revision.
@@ -289,6 +290,8 @@ static void cpu_set_fpu_opts(struct cpuinfo_mips *c)
                            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_UFRP)
+                       c->options |= MIPS_CPU_UFR;
                if (c->fpu_id & MIPS_FPIR_FREP)
                        c->options |= MIPS_CPU_FRE;
        }
@@ -1003,7 +1006,8 @@ static inline unsigned int decode_guest_config3(struct cpuinfo_mips *c)
        unsigned int config3, config3_dyn;
 
        probe_gc0_config_dyn(config3, config3, config3_dyn,
-                            MIPS_CONF_M | MIPS_CONF3_MSA | MIPS_CONF3_CTXTC);
+                            MIPS_CONF_M | MIPS_CONF3_MSA | MIPS_CONF3_ULRI |
+                            MIPS_CONF3_CTXTC);
 
        if (config3 & MIPS_CONF3_CTXTC)
                c->guest.options |= MIPS_CPU_CTXTC;
@@ -1013,6 +1017,9 @@ static inline unsigned int decode_guest_config3(struct cpuinfo_mips *c)
        if (config3 & MIPS_CONF3_PW)
                c->guest.options |= MIPS_CPU_HTW;
 
+       if (config3 & MIPS_CONF3_ULRI)
+               c->guest.options |= MIPS_CPU_ULRI;
+
        if (config3 & MIPS_CONF3_SC)
                c->guest.options |= MIPS_CPU_SEGMENTS;
 
@@ -1051,7 +1058,7 @@ static inline unsigned int decode_guest_config5(struct cpuinfo_mips *c)
        unsigned int config5, config5_dyn;
 
        probe_gc0_config_dyn(config5, config5, config5_dyn,
-                        MIPS_CONF_M | MIPS_CONF5_MRP);
+                        MIPS_CONF_M | MIPS_CONF5_MVH | MIPS_CONF5_MRP);
 
        if (config5 & MIPS_CONF5_MRP)
                c->guest.options |= MIPS_CPU_MAAR;
@@ -1061,6 +1068,9 @@ static inline unsigned int decode_guest_config5(struct cpuinfo_mips *c)
        if (config5 & MIPS_CONF5_LLB)
                c->guest.options |= MIPS_CPU_RW_LLB;
 
+       if (config5 & MIPS_CONF5_MVH)
+               c->guest.options |= MIPS_CPU_MVH;
+
        if (config5 & MIPS_CONF_M)
                c->guest.conf |= BIT(6);
        return config5 & MIPS_CONF_M;
@@ -1946,6 +1956,12 @@ void cpu_probe(void)
        struct cpuinfo_mips *c = &current_cpu_data;
        unsigned int cpu = smp_processor_id();
 
+       /*
+        * Set a default elf platform, cpu probe may later
+        * overwrite it with a more precise value
+        */
+       set_elf_platform(cpu, "mips");
+
        c->processor_id = PRID_IMP_UNKNOWN;
        c->fpu_id       = FPIR_IMP_NONE;
        c->cputype      = CPU_UNKNOWN;