MIPS: Decode core number for R2 CPUs.
[sfrench/cifs-2.6.git] / arch / mips / kernel / cpu-probe.c
index 9b6633171a1fab4d318caca4e5458a81de0190d9..b1b304ea21288414415ec02f9005ee6e5eec9b2e 100644 (file)
@@ -761,6 +761,9 @@ static void __cpuinit decode_configs(struct cpuinfo_mips *c)
                ok = decode_config4(c);
 
        mips_probe_watch_registers(c);
+
+       if (cpu_has_mips_r2)
+               c->core = read_c0_ebase() & 0x3ff;
 }
 
 static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)