]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix erroneous JR emulation for MIPS R6
authorMarkos Chandras <markos.chandras@imgtec.com>
Wed, 24 Jun 2015 08:52:01 +0000 (09:52 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 9 Jul 2015 09:11:43 +0000 (11:11 +0200)
commit72ae3ac98e68809f5dfb7e61dc1a7af06d0eba2a
tree4bc0ebed3888fd6cb66b04bdccf2d0e2dc178593
parentddd2fe18a0122e6c1f4cb62fead4a396f0051803
MIPS: Fix erroneous JR emulation for MIPS R6

Commit f0009745282b6a89222b244d610f8de89a1c7e35 ("MIPS: kernel: Prepare
the JR instruction for emulation on MIPS R6") added support for
emulating the JR instruction on MIPS R6 cores but that introduced a bug
which could be triggered when hitting a JALR opcode because the code used
the wrong field in the 'r_format' struct to determine the instruction
opcode. This lead to crashes because an emulated JALR instruction was
treated as a JR one when the R6 emulator was turned off.

Fixes: f0009745282b ("MIPS: kernel: Prepare the JR instruction for emulation on MIPS R6")
Cc: <stable@vger.kernel.org> # 4.0+
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10583/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/math-emu/cp1emu.c