Thread (5 messages) flat view 5 messages, 2 authors, 2011-10-12
STALE5449d

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

From: Liu Yu <hidden>
Date: 2011-09-05 10:05:45
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help