From: Edgar E. Iglesias Date: Mon, 22 Aug 2011 17:58:06 +0000 (+0200) Subject: microblaze: Raise SIGFPE/FPE_INTDIV for div by zero X-Git-Tag: upstream/snapshot3+hdmi~8870^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15ec090833eeb2ab242c049a68b6224345771619;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git microblaze: Raise SIGFPE/FPE_INTDIV for div by zero It fixes the signal nr raised for divizion by zero from SIGILL to SIGFPE, in accordance to POSIX and other archs. This came up due to a failed test in the GCC testsuite. Signed-off-by: Edgar E. Iglesias --- diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c index 66fad23..6348dc8 100644 --- a/arch/microblaze/kernel/exceptions.c +++ b/arch/microblaze/kernel/exceptions.c @@ -119,7 +119,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, case MICROBLAZE_DIV_ZERO_EXCEPTION: if (user_mode(regs)) { pr_debug("Divide by zero exception in user mode\n"); - _exception(SIGILL, regs, FPE_INTDIV, addr); + _exception(SIGFPE, regs, FPE_INTDIV, addr); return; } printk(KERN_WARNING "Divide by zero exception " \