--- /dev/null
+From c3b9b945e02e011c63522761e91133ea43eb6939 Mon Sep 17 00:00:00 2001
+From: Rob Kendrick <rob.kendrick@codethink.co.uk>
+Date: Wed, 23 Jul 2014 10:03:58 +0100
+Subject: MIPS: math-emu: Fix instruction decoding.
+
+From: Rob Kendrick <rob.kendrick@codethink.co.uk>
+
+commit c3b9b945e02e011c63522761e91133ea43eb6939 upstream.
+
+Tested-by: Aurelien Jarno <aurelien@aurel32.net>
+Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Cc: Markos Chandras <markos.chandras@imgtec.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/math-emu/cp1emu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/math-emu/cp1emu.c
++++ b/arch/mips/math-emu/cp1emu.c
+@@ -1827,7 +1827,7 @@ dcopuop:
+ case -1:
+
+ if (cpu_has_mips_4_5_r)
+- cbit = fpucondbit[MIPSInst_RT(ir) >> 2];
++ cbit = fpucondbit[MIPSInst_FD(ir) >> 2];
+ else
+ cbit = FPU_CSR_COND;
+ if (rv.w)