Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: BMIPS: Fix thinko to release slave TP from reset

Commit 4df715aa ["MIPS: BMIPS: support booting from physical CPU other
than 0"] introduced a thinko which will prevents slave CPUs from being
released from reset on systems where we boot from TP0. The problem is
that we are checking whether the slave CPU logical CPU map is 0, which
is never true for systems booting from TP0, so we do not release the
slave TP from reset and we are just stuck. Fix this by properly checking
that the CPU we intend to boot really is the physical slave CPU (logical
and physical value being 1).

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: jogo@openwrt.org
Cc: cernekee@gmail.com
Cc: Florian Fainelli <florian@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5598/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Florian Fainelli and committed by
Ralf Baechle
976f39b1 a47bde9b

+1 -1
+1 -1
arch/mips/kernel/smp-bmips.c
··· 173 173 else { 174 174 #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) 175 175 /* Reset slave TP1 if booting from TP0 */ 176 - if (cpu_logical_map(cpu) == 0) 176 + if (cpu_logical_map(cpu) == 1) 177 177 set_c0_brcm_cmt_ctrl(0x01); 178 178 #elif defined(CONFIG_CPU_BMIPS5000) 179 179 if (cpu & 0x01)