aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kernel/traps.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 56b2715..599ea93 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -365,6 +365,19 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
if (call_undef_hook(regs, instr) == 0)
return;
+ /* STARGO: hack for DIV emulation */
+ if ((processor_mode(regs) != SVC_MODE) && thumb_mode(regs)) {
+ if ((instr & 0x0310) == 0x0310) { /* Retry for division */
+ unsigned int instr2;
+ get_user(instr2, (u16 __user *)pc + 1);
+ instr <<= 16;
+ instr |= instr2;
+ if (call_undef_hook(regs, instr) == 0)
+ return;
+ }
+ }
+ /* END: STARGO: hack for DIV emulation */
+
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_UNDEFINED) {
printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n",