PERFORCE change 52268 for review

Marcel Moolenaar marcel at FreeBSD.org
Tue May 4 20:02:46 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=52268

Change 52268 by marcel at marcel_nfs on 2004/05/04 20:01:57

	IFC @52266

Affected files ...

.. //depot/projects/gdb/sys/ia64/ia64/trap.c#7 integrate

Differences ...

==== //depot/projects/gdb/sys/ia64/ia64/trap.c#7 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.97 2004/01/20 03:29:24 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.98 2004/05/03 04:13:31 marcel Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ktrace.h"
@@ -670,11 +670,10 @@
 		FPSWA_BUNDLE bundle;
 		char *ip;
 
-		/* Always fatal in kernel. Should never happen. */
-		if (!user)
-			trap_panic(vector, tf);
+		if (fpswa_interface == NULL) {
+			if (!user)
+				trap_panic(vector, tf);
 
-		if (fpswa_interface == NULL) {
 			sig = SIGFPE;
 			ucode = 0;
 			break;
@@ -684,12 +683,15 @@
 		if (vector == IA64_VEC_FLOATING_POINT_TRAP &&
 		    (tf->tf_special.psr & IA64_PSR_RI) == 0)
 			ip -= 16;
-		error = copyin(ip, &bundle, 16);
-		if (error) {
-			sig = SIGBUS;	/* EFAULT, basically */
-			ucode = 0;	/* exception summary */
-			break;
-		}
+		if (user) {
+			error = copyin(ip, &bundle, 16);
+			if (error) {
+				sig = SIGBUS;	/* EFAULT, basically */
+				ucode = 0;	/* exception summary */
+				break;
+			}
+		} else
+			bcopy(ip, &bundle, 16);
 
 		/* f6-f15 are saved in exception_save */
 		fp_state.bitmask_low64 = 0xffc0;	/* bits 6 - 15 */
@@ -741,11 +743,12 @@
 			printf("FATAL: FPSWA err1 %lx, err2 %lx, err3 %lx\n",
 			    fpswa_ret.err1, fpswa_ret.err2, fpswa_ret.err3);
 			panic("fpswa fatal error on fp fault");
-		} else {
+		} else if (user) {
 			sig = SIGFPE;
 			ucode = 0;		/* XXX exception summary */
 			break;
-		}
+		} else
+			goto out;
 	}
 
 	case IA64_VEC_IA32_EXCEPTION:


More information about the p4-projects mailing list