x86: Eliminate TS_XSAVE
The fpu code currently uses current->thread_info->status & TS_XSAVE as a way to distinguish between XSAVE capable processors and older processors. The decision is not really task specific; instead we use the task status to avoid a global memory reference - the value should be the same across all threads. Eliminate this tie-in into the task structure by using an alternative instruction keyed off the XSAVE cpu feature; this results in shorter and faster code, without introducing a global memory reference. [ hpa: in the future, this probably should use an asm jmp ] Signed-off-by:Avi Kivity <avi@redhat.com> Acked-by:
Suresh Siddha <suresh.b.siddha@intel.com> LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com> Signed-off-by:
H. Peter Anvin <hpa@zytor.com>
Showing
- arch/x86/include/asm/i387.h 16 additions, 4 deletionsarch/x86/include/asm/i387.h
- arch/x86/include/asm/thread_info.h 0 additions, 1 deletionarch/x86/include/asm/thread_info.h
- arch/x86/kernel/cpu/common.c 1 addition, 4 deletionsarch/x86/kernel/cpu/common.c
- arch/x86/kernel/i387.c 1 addition, 4 deletionsarch/x86/kernel/i387.c
- arch/x86/kernel/xsave.c 3 additions, 3 deletionsarch/x86/kernel/xsave.c
Loading
Please register or sign in to comment