Module Name: src
Committed By: matt
Date: Tue Mar 17 22:34:10 UTC 2015
Modified Files:
src/sys/arch/arm/vfp: vfp_init.c
Log Message:
Don't try to catch undefined VFP instructions if we own the the FPU.
Let them raise SIGILL.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/arm/vfp/vfp_init.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.43 src/sys/arch/arm/vfp/vfp_init.c:1.44
--- src/sys/arch/arm/vfp/vfp_init.c:1.43 Tue Mar 17 17:20:55 2015
+++ src/sys/arch/arm/vfp/vfp_init.c Tue Mar 17 22:34:10 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: vfp_init.c,v 1.43 2015/03/17 17:20:55 matt Exp $ */
+/* $NetBSD: vfp_init.c,v 1.44 2015/03/17 22:34:10 matt Exp $ */
/*
* Copyright (c) 2008 ARM Ltd
@@ -402,6 +402,10 @@ vfp_handler(u_int address, u_int insn, t
if (!vfp_fpscr_handler(address, insn, frame, fault_code))
return 1;
+ /* if we already own the FPU, raise SIGILL */
+ if (curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp)
+ return 0;
+
/*
* Make sure we own the FP.
*/