浏览代码

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 <edgar.iglesias@gmail.com>
Edgar E. Iglesias 14 年之前
父节点
当前提交
15ec090833
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/microblaze/kernel/exceptions.c

+ 1 - 1
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:
 	case MICROBLAZE_DIV_ZERO_EXCEPTION:
 		if (user_mode(regs)) {
 		if (user_mode(regs)) {
 			pr_debug("Divide by zero exception in user mode\n");
 			pr_debug("Divide by zero exception in user mode\n");
-			_exception(SIGILL, regs, FPE_INTDIV, addr);
+			_exception(SIGFPE, regs, FPE_INTDIV, addr);
 			return;
 			return;
 		}
 		}
 		printk(KERN_WARNING "Divide by zero exception " \
 		printk(KERN_WARNING "Divide by zero exception " \