]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
authorDavid Daney <david.daney@cavium.com>
Fri, 24 May 2013 20:54:09 +0000 (20:54 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 27 Jun 2013 11:08:46 +0000 (13:08 +0200)
In mm_isBranchInstr() we can short circuit the entire function if
!cpu_has_mmips.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5326/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/math-emu/cp1emu.c

index f03771900813cb69c9ddd5f579841350a8c48786..e773659ccf9f8f607db709109e39b0cacb6f7989 100644 (file)
@@ -471,6 +471,9 @@ int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
        unsigned int fcr31;
        unsigned int bit;
 
+       if (!cpu_has_mmips)
+               return 0;
+
        switch (insn.mm_i_format.opcode) {
        case mm_pool32a_op:
                if ((insn.mm_i_format.simmediate & MM_POOL32A_MINOR_MASK) ==