Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/vfp Not only check to see if we own the VFP but...
details: https://anonhg.NetBSD.org/src/rev/079e8d8429d8
branches: trunk
changeset: 336787:079e8d8429d8
user: matt <matt%NetBSD.org@localhost>
date: Fri Mar 20 00:54:30 2015 +0000
description:
Not only check to see if we own the VFP but that the VFP is enabled.
diffstat:
sys/arch/arm/vfp/vfp_init.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 426fd6ded786 -r 079e8d8429d8 sys/arch/arm/vfp/vfp_init.c
--- a/sys/arch/arm/vfp/vfp_init.c Thu Mar 19 22:57:45 2015 +0000
+++ b/sys/arch/arm/vfp/vfp_init.c Fri Mar 20 00:54:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfp_init.c,v 1.44 2015/03/17 22:34:10 matt Exp $ */
+/* $NetBSD: vfp_init.c,v 1.45 2015/03/20 00:54:30 matt Exp $ */
/*
* Copyright (c) 2008 ARM Ltd
@@ -402,8 +402,9 @@
if (!vfp_fpscr_handler(address, insn, frame, fault_code))
return 1;
- /* if we already own the FPU, raise SIGILL */
+ /* if we already own the FPU and it's enabled, raise SIGILL */
if (curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp)
+ && (armreg_fpexc_read() & VFP_FPEXC_EN) != 0)
return 0;
/*
@@ -473,8 +474,9 @@
if (fault_code != FAULT_USER)
panic("NEON fault in non-user mode");
- /* if we already own the FPU, raise SIGILL */
- if (curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp)
+ /* if we already own the FPU and it's enabled, raise SIGILL */
+ if (curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp
+ && (armreg_fpexc_read() & VFP_FPEXC_EN) != 0)
return 0;
pcu_load(&arm_vfp_ops);
Home |
Main Index |
Thread Index |
Old Index