MIPS:CMP Fix physical core number calculation logic
PATCH 1/1 MIPS:CMP Fix physical core number calculation logic
CPUNum Field in EBase register is 10bit wide, so after 1 bit right shift, mask value should be 0x1ff
Signed-off-by jerin jacob <[email protected]>
--- arch/mips/kernel/smp-cmp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/kernel/smp-cmp.c +1 -1
@@ -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
Signature · 1 line
1.7.6.5
Ralf Baechle
AppliedQuoted 2 lines · jerin jacob
CPUNum Field in EBase register is 10bit wide, so after 1 bit right shift, mask value should be
0x1ff
Fortunately nobody has a CMP with more than 256 cores yet :-)
Applied. Thanks,
Ralf