X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Ftraps.c;h=353056110f2b6cca2865bc17a187eaf10806572d;hb=8b805ef617cf0e02f6d18b891f8deb6246421b01;hp=3f6de76d485dc059151d27334a7abc871d99d2a9;hpb=566f74f6b2f8b85d5b8d6caaf97e5672cecd3e3e;p=linux-2.6-omap-h63xx.git diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 3f6de76d485..353056110f2 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -722,6 +723,21 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned int code, die_if_kernel("Kernel bug detected", regs); force_sig(SIGTRAP, current); break; + case BRK_MEMU: + /* + * Address errors may be deliberately induced by the FPU + * emulator to retake control of the CPU after executing the + * instruction in the delay slot of an emulated branch. + * + * Terminate if exception was recognized as a delay slot return + * otherwise handle as normal. + */ + if (do_dsemulret(regs)) + return; + + die_if_kernel("Math emu break/trap", regs); + force_sig(SIGTRAP, current); + break; default: scnprintf(b, sizeof(b), "%s instruction in kernel code", str); die_if_kernel(b, regs);