Skip to content

Commit

Permalink
MIPS: CPS: Stop dangling delay slot from has_mt.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Markos Chandras <[email protected]>
Cc: James Hogan <[email protected]>
Cc: <[email protected]> # 3.16+
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/10865/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
paulburton authored and ralfbaechle committed Sep 30, 2015
1 parent 5396005 commit 1e5fb28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/kernel/cps-vec.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
mfc0 \dest, CP0_CONFIG, 3
andi \dest, \dest, MIPS_CONF3_MT
beqz \dest, \nomt
nop
.endm

.section .text.cps-vec
Expand Down Expand Up @@ -226,7 +227,6 @@ LEAF(mips_cps_core_init)
#ifdef CONFIG_MIPS_MT
/* Check that the core implements the MT ASE */
has_mt t0, 3f
nop

.set push
.set mips64r2
Expand Down Expand Up @@ -310,8 +310,8 @@ LEAF(mips_cps_boot_vpes)
PTR_ADDU t0, t0, t1

/* Calculate this VPEs ID. If the core doesn't support MT use 0 */
li t9, 0
has_mt ta2, 1f
li t9, 0

/* Find the number of VPEs present in the core */
mfc0 t1, CP0_MVPCONF0
Expand Down

0 comments on commit 1e5fb28

Please sign in to comment.