]> git.openpandora.org Git - pandora-kernel.git/commitdiff
MIPS: kernel: Prepare the JR instruction for emulation on MIPS R6
authorMarkos Chandras <markos.chandras@imgtec.com>
Tue, 25 Nov 2014 15:54:14 +0000 (15:54 +0000)
committerMarkos Chandras <markos.chandras@imgtec.com>
Tue, 17 Feb 2015 15:37:31 +0000 (15:37 +0000)
The MIPS R6 JR instruction is an alias to the JALR one, so it may
need emulation for non-R6 userlands.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
arch/mips/include/asm/branch.h
arch/mips/kernel/branch.c
arch/mips/math-emu/cp1emu.c

index de781cf54bc7a22b4ae81f506ff1a869c6b1cc32..2894ea58454d8902a3c80ff1d4257560f2e57051 100644 (file)
@@ -13,6 +13,9 @@
 #include <asm/ptrace.h>
 #include <asm/inst.h>
 
+static int mipsr2_emulation = 0;
+#define NO_R6EMU       (cpu_has_mips_r6 && !mipsr2_emulation)
+
 extern int __isa_exception_epc(struct pt_regs *regs);
 extern int __compute_return_epc(struct pt_regs *regs);
 extern int __compute_return_epc_for_insn(struct pt_regs *regs,
Simple merge
Simple merge