brcm63xx: Add profile and build image for Sagemcom F@ST2704V2 ADSL router
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-3.10 / 056-MIPS-BMIPS-Fix-thinko-to-release-slave-TP-from-reset.patch
1 From 976f39b139cdd06a88a5aadd8202b0c30cac9cda Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <florian@openwrt.org>
3 Date: Wed, 17 Jul 2013 17:56:31 +0000
4 Subject: [PATCH] MIPS: BMIPS: Fix thinko to release slave TP from reset
5
6 Commit 4df715aa ["MIPS: BMIPS: support booting from physical CPU other
7 than 0"] introduced a thinko which will prevents slave CPUs from being
8 released from reset on systems where we boot from TP0. The problem is
9 that we are checking whether the slave CPU logical CPU map is 0, which
10 is never true for systems booting from TP0, so we do not release the
11 slave TP from reset and we are just stuck. Fix this by properly checking
12 that the CPU we intend to boot really is the physical slave CPU (logical
13 and physical value being 1).
14
15 Signed-off-by: Florian Fainelli <florian@openwrt.org>
16 Cc: linux-mips@linux-mips.org
17 Cc: blogic@openwrt.org
18 Cc: jogo@openwrt.org
19 Cc: cernekee@gmail.com
20 Cc: Florian Fainelli <florian@openwrt.org>
21 Patchwork: https://patchwork.linux-mips.org/patch/5598/
22 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
23 ---
24 arch/mips/kernel/smp-bmips.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27 --- a/arch/mips/kernel/smp-bmips.c
28 +++ b/arch/mips/kernel/smp-bmips.c
29 @@ -173,7 +173,7 @@ static void bmips_boot_secondary(int cpu
30 else {
31 #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380)
32 /* Reset slave TP1 if booting from TP0 */
33 - if (cpu_logical_map(cpu) == 0)
34 + if (cpu_logical_map(cpu) == 1)
35 set_c0_brcm_cmt_ctrl(0x01);
36 #elif defined(CONFIG_CPU_BMIPS5000)
37 if (cpu & 0x01)