x86: Introduce 'struct fpu' and related API
Currently all fpu state access is through tsk->thread.xstate. Since we wish to generalize fpu access to non-task contexts, wrap the state in a new 'struct fpu' and convert existing access to use an fpu API. Signal frame handlers are not converted to the API since they will remain task context only things. Signed-off-by: Avi Kivity <avi@redhat.com> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> LKML-Reference: <1273135546-29690-3-git-send-email-avi@redhat.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
c9ad488289
commit
8660328332
@ -380,6 +380,10 @@ union thread_xstate {
|
||||
struct xsave_struct xsave;
|
||||
};
|
||||
|
||||
struct fpu {
|
||||
union thread_xstate *state;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
DECLARE_PER_CPU(struct orig_ist, orig_ist);
|
||||
|
||||
@ -457,7 +461,7 @@ struct thread_struct {
|
||||
unsigned long trap_no;
|
||||
unsigned long error_code;
|
||||
/* floating point and extended processor state */
|
||||
union thread_xstate *xstate;
|
||||
struct fpu fpu;
|
||||
#ifdef CONFIG_X86_32
|
||||
/* Virtual 86 mode info */
|
||||
struct vm86_struct __user *vm86_info;
|
||||
|
Reference in New Issue
Block a user