diff options
author | Florian Fainelli <florian@openwrt.org> | 2013-07-24 16:12:11 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-07-30 16:54:29 (GMT) |
commit | ff5fadaff39180dc0b652753b5614a564711be29 (patch) | |
tree | 07662c3a1f58bd8355a4f7d3da23c2962f15be07 /arch/mips/kernel/bmips_vec.S | |
parent | c4091d3fbbed922a3641e5e749655e49cc0d4dee (diff) | |
download | linux-ff5fadaff39180dc0b652753b5614a564711be29.tar.xz |
MIPS: BMIPS: fix slave CPU booting when physical CPU is not 0
The current BMIPS SMP code assumes that the slave CPU is physical and
logical CPU 1, but on some systems such as BCM3368, the slave CPU is
physical CPU0. Fix the code to read the physical CPU (thread ID) we are
running this code on, and adjust the relocation vector address based on
it. This allows bringing up the second CPU on BCM3368 for instance.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: jogo@openwrt.org
Cc: blogic@openwrt.org
Patchwork: https://patchwork.linux-mips.org/patch/5621/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/bmips_vec.S')
-rw-r--r-- | arch/mips/kernel/bmips_vec.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/kernel/bmips_vec.S b/arch/mips/kernel/bmips_vec.S index f739aed..bd79c4f 100644 --- a/arch/mips/kernel/bmips_vec.S +++ b/arch/mips/kernel/bmips_vec.S @@ -54,7 +54,11 @@ LEAF(bmips_smp_movevec) /* set up CPU1 CBR; move BASE to 0xa000_0000 */ li k0, 0xff400000 mtc0 k0, $22, 6 - li k1, CKSEG1 | BMIPS_RELO_VECTOR_CONTROL_1 + /* set up relocation vector address based on thread ID */ + mfc0 k1, $22, 3 + srl k1, 16 + andi k1, 0x8000 + or k1, CKSEG1 | BMIPS_RELO_VECTOR_CONTROL_0 or k0, k1 li k1, 0xa0080000 sw k1, 0(k0) |