[PATCH 3/3] math_emu/efp: Look for errata handler when type mismatches

Liu Yu yu.liu at freescale.com
Mon Sep 5 19:01:23 EST 2011


We already have cpu a005 errata handler when instruction cannot be recgnized.
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 at freescale.com>
---
 arch/powerpc/math-emu/math_efp.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c
index 96dbbae..707da4c 100644
--- a/arch/powerpc/math-emu/math_efp.c
+++ b/arch/powerpc/math-emu/math_efp.c
@@ -173,8 +173,7 @@ static unsigned long insn_type(unsigned long speinsn)
 	case EFDSUB:	ret = AB;	break;
 
 	default:
-		printk(KERN_ERR "\nOoops! SPE instruction no type found.");
-		printk(KERN_ERR "\ninst code: %08lx\n", speinsn);
+		break;
 	}
 
 	return ret;
@@ -195,7 +194,7 @@ int do_spe_mathemu(struct pt_regs *regs)
 
 	type = insn_type(speinsn);
 	if (type == NOTYPE)
-		return -ENOSYS;
+		goto illegal;
 
 	func = speinsn & 0x7ff;
 	fc = (speinsn >> 21) & 0x1f;
-- 
1.6.4




More information about the Linuxppc-dev mailing list