aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/processor.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-05-06 04:45:46 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-05-10 13:48:55 -0400
commit86603283326c9e95e5ad4e9fdddeec93cac5d9ad (patch)
tree1a26a37434e920f9519b547814a1a9af35022de8 /arch/x86/include/asm/processor.h
parentc9ad488289144ae5ef53b012e15895ef1f5e4bb6 (diff)
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>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r--arch/x86/include/asm/processor.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index b753ea59703a..b684f587647c 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -380,6 +380,10 @@ union thread_xstate {
380 struct xsave_struct xsave; 380 struct xsave_struct xsave;
381}; 381};
382 382
383struct fpu {
384 union thread_xstate *state;
385};
386
383#ifdef CONFIG_X86_64 387#ifdef CONFIG_X86_64
384DECLARE_PER_CPU(struct orig_ist, orig_ist); 388DECLARE_PER_CPU(struct orig_ist, orig_ist);
385 389
@@ -457,7 +461,7 @@ struct thread_struct {
457 unsigned long trap_no; 461 unsigned long trap_no;
458 unsigned long error_code; 462 unsigned long error_code;
459 /* floating point and extended processor state */ 463 /* floating point and extended processor state */
460 union thread_xstate *xstate; 464 struct fpu fpu;
461#ifdef CONFIG_X86_32 465#ifdef CONFIG_X86_32
462 /* Virtual 86 mode info */ 466 /* Virtual 86 mode info */
463 struct vm86_struct __user *vm86_info; 467 struct vm86_struct __user *vm86_info;