Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2018 22:38:17 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r333771 - head/sys/arm64/arm64
Message-ID:  <201805172238.w4HMcHd5013764@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Thu May 17 22:38:16 2018
New Revision: 333771
URL: https://svnweb.freebsd.org/changeset/base/333771

Log:
  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.

Modified:
  head/sys/arm64/arm64/vfp.c

Modified: head/sys/arm64/arm64/vfp.c
==============================================================================
--- head/sys/arm64/arm64/vfp.c	Thu May 17 21:49:34 2018	(r333770)
+++ head/sys/arm64/arm64/vfp.c	Thu May 17 22:38:16 2018	(r333771)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805172238.w4HMcHd5013764>