From: Niklas Cassel Date: Thu, 15 Jan 2015 15:41:13 +0000 (+0100) Subject: MIPS: smp-cps: cpu_set FPU mask if FPU present X-Git-Tag: v4.0.3~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bd1f3713cd795cdd750b869f98674b40748ef92;p=thirdparty%2Fkernel%2Fstable.git MIPS: smp-cps: cpu_set FPU mask if FPU present Commit 90db024f140d0d6ad960cc5f090e3c8ed890ca55 upstream. If we have an FPU, enroll ourselves in the FPU-full mask. Matching the MT_SMP and CMP implementations of smp_setup. Signed-off-by: Niklas Cassel Cc: paul.burton@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8948/ Signed-off-by: Ralf Baechle Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index bed7590e475f4..d5589bedd0a40 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -88,6 +88,12 @@ static void __init cps_smp_setup(void) /* Make core 0 coherent with everything */ write_gcr_cl_coherence(0xff); + +#ifdef CONFIG_MIPS_MT_FPAFF + /* If we have an FPU, enroll ourselves in the FPU-full mask */ + if (cpu_has_fpu) + cpu_set(0, mt_fpu_cpumask); +#endif /* CONFIG_MIPS_MT_FPAFF */ } static void __init cps_prepare_cpus(unsigned int max_cpus)