Skip to content

Commit

Permalink
MIPS: CMP: Fix physical core number calculation logic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jerin jacob authored and Ralf Baechle committed Oct 18, 2012
1 parent a122654 commit 0cc40da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/kernel/smp-cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void cmp_init_secondary(void)

/* Enable per-cpu interrupts: platform specific */

c->core = (read_c0_ebase() >> 1) & 0xff;
c->core = (read_c0_ebase() >> 1) & 0x1ff;
#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE;
#endif
Expand Down

0 comments on commit 0cc40da

Please sign in to comment.