aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2015-08-05 18:42:36 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-09-30 12:15:29 -0400
commit1e5fb282f8eda889776ee83f9214d5df9edaa26d (patch)
tree1c0a2933729316f1dee3292a78fb0964ca14faca /arch
parent53960059d56ecef67d4ddd546731623641a3d2d1 (diff)
MIPS: CPS: Stop dangling delay slot from has_mt.
The has_mt macro ended with a branch, leaving its callers with a delay slot that would be executed if Config3.MT is not set. However it would not be executed if Config3 (or earlier Config registers) don't exist which makes it somewhat inconsistent at best. Fill the delay slot in the macro & fix the mips_cps_boot_vpes caller appropriately. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: <stable@vger.kernel.org> # 3.16+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/10865/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/cps-vec.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S
index 9f71c06aebf6..fa159aab252c 100644
--- a/arch/mips/kernel/cps-vec.S
+++ b/arch/mips/kernel/cps-vec.S
@@ -39,6 +39,7 @@
39 mfc0 \dest, CP0_CONFIG, 3 39 mfc0 \dest, CP0_CONFIG, 3
40 andi \dest, \dest, MIPS_CONF3_MT 40 andi \dest, \dest, MIPS_CONF3_MT
41 beqz \dest, \nomt 41 beqz \dest, \nomt
42 nop
42 .endm 43 .endm
43 44
44.section .text.cps-vec 45.section .text.cps-vec
@@ -226,7 +227,6 @@ LEAF(mips_cps_core_init)
226#ifdef CONFIG_MIPS_MT 227#ifdef CONFIG_MIPS_MT
227 /* Check that the core implements the MT ASE */ 228 /* Check that the core implements the MT ASE */
228 has_mt t0, 3f 229 has_mt t0, 3f
229 nop
230 230
231 .set push 231 .set push
232 .set mips64r2 232 .set mips64r2
@@ -310,8 +310,8 @@ LEAF(mips_cps_boot_vpes)
310 PTR_ADDU t0, t0, t1 310 PTR_ADDU t0, t0, t1
311 311
312 /* Calculate this VPEs ID. If the core doesn't support MT use 0 */ 312 /* Calculate this VPEs ID. If the core doesn't support MT use 0 */
313 li t9, 0
313 has_mt ta2, 1f 314 has_mt ta2, 1f
314 li t9, 0
315 315
316 /* Find the number of VPEs present in the core */ 316 /* Find the number of VPEs present in the core */
317 mfc0 t1, CP0_MVPCONF0 317 mfc0 t1, CP0_MVPCONF0