The code already checked for MT in most cases but executed dmt instructions regardless of whether the CPU implements the MT ASE. This would lead to a reserved instruction exception on those which do not. Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx> --- Feel free to apply this as a fixup to "MIPS: Coherent Processing System SMP implementation". --- arch/mips/kernel/smp-cps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 4b812c1..536eec0 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -141,7 +141,8 @@ static void __init cps_smp_setup(void) bitmap_set(core_power, 0, 1); /* Disable MT - we only want to run 1 TC per VPE */ - dmt(); + if (cpu_has_mipsmt) + dmt(); /* Initialise core 0 */ init_core(); @@ -268,6 +269,8 @@ static void cps_boot_secondary(int cpu, struct task_struct *idle) return; } + BUG_ON(!cpu_has_mipsmt); + /* Boot a VPE on this core */ boot_vpe(&cfg); } @@ -275,7 +278,8 @@ static void cps_boot_secondary(int cpu, struct task_struct *idle) static void cps_init_secondary(void) { /* Disable MT - we only want to run 1 TC per VPE */ - dmt(); + if (cpu_has_mipsmt) + dmt(); /* TODO: revisit this assumption once hotplug is implemented */ if (cpu_vpe_id(¤t_cpu_data) == 0) -- 1.8.5.3