提交 c3f8978e 编写于 作者: H H. Peter Anvin

x86, fpu: Unbreak FPU emulation

Unbreak FPU emulation, broken by checkin
86603283:
x86: Introduce 'struct fpu' and related API
Signed-off-by: NH. 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>
上级 86603283
...@@ -52,7 +52,7 @@ void finit_soft_fpu(struct i387_soft_struct *soft) ...@@ -52,7 +52,7 @@ void finit_soft_fpu(struct i387_soft_struct *soft)
void finit(void) void finit(void)
{ {
finit_task(&current->thread.fpu); finit_soft_fpu(&current->thread.fpu.state->soft);
} }
/* /*
......
...@@ -681,7 +681,7 @@ int fpregs_soft_set(struct task_struct *target, ...@@ -681,7 +681,7 @@ int fpregs_soft_set(struct task_struct *target,
unsigned int pos, unsigned int count, unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf) const void *kbuf, const void __user *ubuf)
{ {
struct i387_soft_struct *s387 = &target->thread.xstate->soft; struct i387_soft_struct *s387 = &target->thread.fpu.state->soft;
void *space = s387->st_space; void *space = s387->st_space;
int ret; int ret;
int offset, other, i, tags, regnr, tag, newtop; int offset, other, i, tags, regnr, tag, newtop;
...@@ -733,7 +733,7 @@ int fpregs_soft_get(struct task_struct *target, ...@@ -733,7 +733,7 @@ int fpregs_soft_get(struct task_struct *target,
unsigned int pos, unsigned int count, unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf) void *kbuf, void __user *ubuf)
{ {
struct i387_soft_struct *s387 = &target->thread.xstate->soft; struct i387_soft_struct *s387 = &target->thread.fpu.state->soft;
const void *space = s387->st_space; const void *space = s387->st_space;
int ret; int ret;
int offset = (S387->ftop & 7) * 10, other = 80 - offset; int offset = (S387->ftop & 7) * 10, other = 80 - offset;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \ #define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \
== (1 << 10)) == (1 << 10))
#define I387 (current->thread.xstate) #define I387 (current->thread.fpu.state)
#define FPU_info (I387->soft.info) #define FPU_info (I387->soft.info)
#define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs)) #define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册