Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Thu, 27 Apr 2006 17:24:04 -0700 | From | Greg KH <> | Subject | [patch 24/24] MIPS: Fix branch emulation for floating-point exceptions. |
| |
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Win Treese <treese@acm.org>
In the branch emulation for floating-point exceptions, __compute_return_epc must determine for bc1f et al which condition code bit to test. This is based on bits <4:2> of the rt field. The switch statement to distinguish bc1f et al needs to use only the two low bits of rt, but the old code tests on the whole rt field. This patch masks off the proper bits.
Signed-off-by: Win Treese <treese@acm.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- arch/mips/kernel/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.16.11.orig/arch/mips/kernel/branch.c +++ linux-2.6.16.11/arch/mips/kernel/branch.c @@ -184,7 +184,7 @@ int __compute_return_epc(struct pt_regs bit = (insn.i_format.rt >> 2); bit += (bit != 0); bit += 23; - switch (insn.i_format.rt) { + switch (insn.i_format.rt & 3) { case 0: /* bc1f */ case 2: /* bc1fl */ if (~fcr31 & (1 << bit)) -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |