| To: | linux-mips@linux-mips.org, ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH] MIPS: Decode core number for R2 CPUs. |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Mon, 26 Jul 2010 14:29:37 -0700 |
| Cc: | David Daney <ddaney@caviumnetworks.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
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>
---
arch/mips/kernel/cpu-probe.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 9b66331..b1b304e 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -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)
--
1.7.1.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] MIPS: Octeon: Fix build error in cavium-octeon/cpu.c, David Daney |
|---|---|
| Next by Date: | Re: [PATCH] MIPS: Apply kmap_high_get on DMA functions., Kevin Cernekee |
| Previous by Thread: | [PATCH] MIPS: Octeon: Fix build error in cavium-octeon/cpu.c, David Daney |
| Next by Thread: | [PATCH 0/2] OCTEON MSI improvements., David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |