Skip to content
  • Henning Schild's avatar
    cobalt/x86: add support for eager fpu handling · cb52e6c7
    Henning Schild authored and Jan Kiszka's avatar Jan Kiszka committed
    
    
    Upstream 4.14 switched to purely eager fpu switching. That was
    backported to 4.4 and 4.9. This commit makes cobalt able to deal whith
    the changed kernel behaviour.
    This commit takes care of 4.9 to begin with.
    
    Introduce IPIPE_X86_FPU_EAGER to switch between the new and the old
    implementations. The new implementation is much simpler than the old
    one. We basically only deal with the odd case where Xenomai preempts
    Linux in a kernel-fpu context.
    In a regular Linux that can never happen and if it happens we need to
    make sure to get things into a consistent state. We have to make
    "current" as not owning the fpu anymore and allow others to use
    in-kernel fpu (kernel_fpu_enable). __switch_to from Linux will do the
    rest.
    
    Signed-off-by: default avatarHenning Schild <henning.schild@siemens.com>
    [Jan: converted C++-style comments]
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    cb52e6c7