Browse Source

powerpc/math_emu/efp: Look for errata handler when type mismatches

We already have cpu a005 errata handler when instruction cannot be
recognized.  Before we lookup the inst, there's type checking, and we also
need to handle it in errata handler when the type checking failed.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Liu Yu 14 năm trước cách đây
mục cha
commit
09af52f78e
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  1. 1 5
      arch/powerpc/math-emu/math_efp.c

+ 1 - 5
arch/powerpc/math-emu/math_efp.c

@@ -171,10 +171,6 @@ static unsigned long insn_type(unsigned long speinsn)
 	case EFDNABS:	ret = XA;	break;
 	case EFDNABS:	ret = XA;	break;
 	case EFDNEG:	ret = XA;	break;
 	case EFDNEG:	ret = XA;	break;
 	case EFDSUB:	ret = AB;	break;
 	case EFDSUB:	ret = AB;	break;
-
-	default:
-		printk(KERN_ERR "\nOoops! SPE instruction no type found.");
-		printk(KERN_ERR "\ninst code: %08lx\n", speinsn);
 	}
 	}
 
 
 	return ret;
 	return ret;
@@ -195,7 +191,7 @@ int do_spe_mathemu(struct pt_regs *regs)
 
 
 	type = insn_type(speinsn);
 	type = insn_type(speinsn);
 	if (type == NOTYPE)
 	if (type == NOTYPE)
-		return -ENOSYS;
+		goto illegal;
 
 
 	func = speinsn & 0x7ff;
 	func = speinsn & 0x7ff;
 	fc = (speinsn >> 21) & 0x1f;
 	fc = (speinsn >> 21) & 0x1f;