Commit a4bec3dc authored by Henning Schild's avatar Henning Schild Committed by Jan Kiszka

cobalt/x86: fix condition in eager fpu code for kernels < 4.14

We should mark the current task as not owning the fpu anymore if it does
actually own the fpu, not if the fpu itself is active.

Fixes cb52e6c7Reported-by: 's avatarMauro Salvini <mauro.salvini@smigroup.net>
Signed-off-by: Henning Schild's avatarHenning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 5cce40f6
...@@ -475,7 +475,7 @@ void xnarch_leave_root(struct xnthread *root) ...@@ -475,7 +475,7 @@ void xnarch_leave_root(struct xnthread *root)
switch_fpu_finish(&current->thread.fpu, smp_processor_id()); switch_fpu_finish(&current->thread.fpu, smp_processor_id());
#else #else
/* mark current thread as not owning the FPU anymore */ /* mark current thread as not owning the FPU anymore */
if (&current->thread.fpu.fpstate_active) if (fpregs_active())
fpregs_deactivate(&current->thread.fpu); fpregs_deactivate(&current->thread.fpu);
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment