aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorOlivier Houchard <cognet@FreeBSD.org>2018-05-17 22:38:16 +0000
committerOlivier Houchard <cognet@FreeBSD.org>2018-05-17 22:38:16 +0000
commit654a792922d2d715dbf179162c0f8e589da11a4b (patch)
tree358ff53f6218722a1bc81214747656151e4c663b /sys/arm64
parenta5f1042498465d17e28b80697c2b676e444b7da0 (diff)
downloadsrc-654a792922d2d715dbf179162c0f8e589da11a4b.tar.gz
src-654a792922d2d715dbf179162c0f8e589da11a4b.zip
In vfp_save_state(), don't bother trying to save the VFP registers if the
provided PCB doesn't have a pcb_fpusaved. All PCBs associated to a thread should have one, but the dumppcb used when panic'ing doesn't.
Notes
Notes: svn path=/head/; revision=333771
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/arm64/vfp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c
index 2b810eeb6339..b11e799fcdb6 100644
--- a/sys/arm64/arm64/vfp.c
+++ b/sys/arm64/arm64/vfp.c
@@ -170,6 +170,15 @@ vfp_save_state(struct thread *td, struct pcb *pcb)
KASSERT(pcb != NULL, ("NULL vfp pcb"));
KASSERT(td == NULL || td->td_pcb == pcb, ("Invalid vfp pcb"));
+ /*
+ * savectx() will be called on panic with dumppcb as an argument,
+ * dumppcb doesn't have pcb_fpusaved set so don't make any attempt
+ * to store the VFP registers in it, we probably don't care much
+ * at that point, anyway.
+ */
+ if (pcb->pcb_fpusaved == NULL)
+ return;
+
if (td == NULL)
td = curthread;