]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems
authorPaul Burton <paul.burton@imgtec.com>
Fri, 30 Sep 2016 16:25:01 +0000 (17:25 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 1 Oct 2016 23:40:56 +0000 (01:40 +0200)
commite4ac9620e598407442ac268252459f6eb60f77a0
treea0348acb786b807e158e3164fa7fd50a4ab653eb
parent09fd558250f284da639139d8e17c02eb1740eeb6
MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems

When discovering the number of VPEs per core, smp_num_siblings will be
incorrect for kernels built without support for the MIPS MultiThreading
(MT) ASE running on systems which implement said ASE. This leads to
accesses to VPEs in secondary cores being performed incorrectly since
mips_cm_vp_id calculates the wrong ID to write to the local "other"
registers. Fix this by examining the number of VPEs in the core as
reported by the CM.

This patch presumes that the number of VPEs will be the same in each
core of the system. As this path only applies to systems with CM version
2.5 or lower, and this property is true of all such known systems, this
is likely to be fine but is described in a comment for good measure.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14338/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mips-cm.h