Author: jhibbits
Date: Sun Oct 23 01:01:08 2016
New Revision: 307813
URL: https://svnweb.freebsd.org/changeset/base/307813

Log:
  Use the right thread pointer for SPE alignment exceptions.

Modified:
  head/sys/powerpc/powerpc/trap.c

Modified: head/sys/powerpc/powerpc/trap.c
==============================================================================
--- head/sys/powerpc/powerpc/trap.c     Sun Oct 23 00:46:53 2016        
(r307812)
+++ head/sys/powerpc/powerpc/trap.c     Sun Oct 23 01:01:08 2016        
(r307813)
@@ -765,13 +765,13 @@ fix_unaligned(struct thread *td, struct 
                fpr = (double *)td->td_pcb->pcb_vec.vr[reg];
                fputhread = PCPU_GET(vecthread);
 
-               /* Juggle the FPU to ensure that we've initialized
-                * the FPRs, and that their current state is in
+               /* Juggle the SPE to ensure that we've initialized
+                * the registers, and that their current state is in
                 * the PCB.
                 */
-               if (fputhread != td) {
-                       if (fputhread)
-                               save_vec(fputhread);
+               if (vecthread != td) {
+                       if (vecthread)
+                               save_vec(vecthread);
                        enable_vec(td);
                }
                save_vec(td);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to