diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-05-10 16:37:16 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-05-10 16:37:16 -0400 |
commit | c3f8978ea332cd4be88e12574452a025892ac9af (patch) | |
tree | 8a673afd732fb5d2e57cbb7e60006184cee84bf5 /arch/x86/math-emu | |
parent | 86603283326c9e95e5ad4e9fdddeec93cac5d9ad (diff) |
x86, fpu: Unbreak FPU emulation
Unbreak FPU emulation, broken by checkin
86603283326c9e95e5ad4e9fdddeec93cac5d9ad:
x86: Introduce 'struct fpu' and related API
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-3-git-send-email-avi@redhat.com>
Diffstat (limited to 'arch/x86/math-emu')
-rw-r--r-- | arch/x86/math-emu/fpu_aux.c | 2 | ||||
-rw-r--r-- | arch/x86/math-emu/fpu_entry.c | 4 | ||||
-rw-r--r-- | arch/x86/math-emu/fpu_system.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/math-emu/fpu_aux.c b/arch/x86/math-emu/fpu_aux.c index 62797f93051..dc8adad10a2 100644 --- a/arch/x86/math-emu/fpu_aux.c +++ b/arch/x86/math-emu/fpu_aux.c | |||
@@ -52,7 +52,7 @@ void finit_soft_fpu(struct i387_soft_struct *soft) | |||
52 | 52 | ||
53 | void finit(void) | 53 | void finit(void) |
54 | { | 54 | { |
55 | finit_task(¤t->thread.fpu); | 55 | finit_soft_fpu(¤t->thread.fpu.state->soft); |
56 | } | 56 | } |
57 | 57 | ||
58 | /* | 58 | /* |
diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c index 5d87f586f8d..7718541541d 100644 --- a/arch/x86/math-emu/fpu_entry.c +++ b/arch/x86/math-emu/fpu_entry.c | |||
@@ -681,7 +681,7 @@ int fpregs_soft_set(struct task_struct *target, | |||
681 | unsigned int pos, unsigned int count, | 681 | unsigned int pos, unsigned int count, |
682 | const void *kbuf, const void __user *ubuf) | 682 | const void *kbuf, const void __user *ubuf) |
683 | { | 683 | { |
684 | struct i387_soft_struct *s387 = &target->thread.xstate->soft; | 684 | struct i387_soft_struct *s387 = &target->thread.fpu.state->soft; |
685 | void *space = s387->st_space; | 685 | void *space = s387->st_space; |
686 | int ret; | 686 | int ret; |
687 | int offset, other, i, tags, regnr, tag, newtop; | 687 | int offset, other, i, tags, regnr, tag, newtop; |
@@ -733,7 +733,7 @@ int fpregs_soft_get(struct task_struct *target, | |||
733 | unsigned int pos, unsigned int count, | 733 | unsigned int pos, unsigned int count, |
734 | void *kbuf, void __user *ubuf) | 734 | void *kbuf, void __user *ubuf) |
735 | { | 735 | { |
736 | struct i387_soft_struct *s387 = &target->thread.xstate->soft; | 736 | struct i387_soft_struct *s387 = &target->thread.fpu.state->soft; |
737 | const void *space = s387->st_space; | 737 | const void *space = s387->st_space; |
738 | int ret; | 738 | int ret; |
739 | int offset = (S387->ftop & 7) * 10, other = 80 - offset; | 739 | int offset = (S387->ftop & 7) * 10, other = 80 - offset; |
diff --git a/arch/x86/math-emu/fpu_system.h b/arch/x86/math-emu/fpu_system.h index 50fa0ec2c8a..2c614410a5f 100644 --- a/arch/x86/math-emu/fpu_system.h +++ b/arch/x86/math-emu/fpu_system.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \ | 31 | #define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \ |
32 | == (1 << 10)) | 32 | == (1 << 10)) |
33 | 33 | ||
34 | #define I387 (current->thread.xstate) | 34 | #define I387 (current->thread.fpu.state) |
35 | #define FPU_info (I387->soft.info) | 35 | #define FPU_info (I387->soft.info) |
36 | 36 | ||
37 | #define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs)) | 37 | #define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs)) |