Merge tag 'x86-fpu-2021-07-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-microblaze.git] / arch / x86 / kernel / traps.c
index ed540e0..a588009 100644 (file)
@@ -1046,9 +1046,10 @@ static void math_error(struct pt_regs *regs, int trapnr)
        }
 
        /*
-        * Save the info for the exception handler and clear the error.
+        * Synchronize the FPU register state to the memory register state
+        * if necessary. This allows the exception handler to inspect it.
         */
-       fpu__save(fpu);
+       fpu_sync_fpstate(fpu);
 
        task->thread.trap_nr    = trapnr;
        task->thread.error_code = 0;