diff options
author | jerin jacob <jerinjacobk@gmail.com> | 2012-10-11 12:48:51 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-10-18 05:45:41 -0400 |
commit | 0cc40dac8605b3b6b099b47cdde9500d592e6583 (patch) | |
tree | 322340d7a49068430565199ebeb18055924c7e9a /arch/mips/kernel/smp-cmp.c | |
parent | a12265400c18e6e67d444f05fec3a792a2f87c10 (diff) |
MIPS: CMP: Fix physical core number calculation logic
The CPUNum Field in EBase register is 10bit wide, so after 1 bit right
shift, the mask value should be 0x1ff.
Signed-off-by: jerin jacob <jerinjacobk@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4420/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/smp-cmp.c')
-rw-r--r-- | arch/mips/kernel/smp-cmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index afc379ca3753..06cd0c610f44 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
@@ -97,7 +97,7 @@ static void cmp_init_secondary(void) | |||
97 | 97 | ||
98 | /* Enable per-cpu interrupts: platform specific */ | 98 | /* Enable per-cpu interrupts: platform specific */ |
99 | 99 | ||
100 | c->core = (read_c0_ebase() >> 1) & 0xff; | 100 | c->core = (read_c0_ebase() >> 1) & 0x1ff; |
101 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 101 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
102 | c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; | 102 | c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; |
103 | #endif | 103 | #endif |