Skip to content
  • Jan Kiszka's avatar
    cobalt/x86: Account for FPU changes in kernel 5.2 · 608c2329
    Jan Kiszka authored
    
    
    Since that version, the FPU is only updated when returning to userspace.
    This breaks the thread switching expectations of Xenomai because there
    is no update happening when returning to a thread in primary mode or
    when switching in a primary-mode kernel thread.
    
    Account for that by
     - saving the context when switching out an in-kernel Xenomai thread
     - restoring the context after switching in a Xenomai thread
     - invalidate the FPU state variables after returning to a preempted
       Linux kernel thread that uses the FPU
    
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    608c2329