Skip to content

Commit

Permalink
MIPS: Decode core number for R2 CPUs.
Browse files Browse the repository at this point in the history
The struct cpuinfo_mips.core field should be populated with the
physical core number.  For R2 CPUs, this is carried in the low 10 bits
of Ebase.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1505/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
David Daney authored and Ralf Baechle committed Aug 5, 2010
1 parent fa90c87 commit 0c2f455
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/mips/kernel/cpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0c2f455

Please sign in to comment.