diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-10 16:34:43 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-10 16:34:43 +0100 |
commit | 8c54436ae9f59146b3d02820a3ebbf71e61f2aee (patch) | |
tree | 0ab1a3847809bd7d5f44fc52b1f16fabd953c4bb /arch/x86/math-emu/fpu_aux.c | |
parent | 5ed0cec0ac5f1b3759bdbe4d9df32ee4ff8afb5a (diff) | |
parent | 7a203f3b089be4410fe065dd9927027eade94557 (diff) |
Merge branches 'sched/cleanups' and 'linus' into sched/core
Diffstat (limited to 'arch/x86/math-emu/fpu_aux.c')
-rw-r--r-- | arch/x86/math-emu/fpu_aux.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/arch/x86/math-emu/fpu_aux.c b/arch/x86/math-emu/fpu_aux.c index 491e737ce54..aa098708877 100644 --- a/arch/x86/math-emu/fpu_aux.c +++ b/arch/x86/math-emu/fpu_aux.c @@ -30,20 +30,29 @@ static void fclex(void) } /* Needs to be externally visible */ -void finit(void) +void finit_task(struct task_struct *tsk) { - control_word = 0x037f; - partial_status = 0; - top = 0; /* We don't keep top in the status word internally. */ - fpu_tag_word = 0xffff; + struct i387_soft_struct *soft = &tsk->thread.xstate->soft; + struct address *oaddr, *iaddr; + soft->cwd = 0x037f; + soft->swd = 0; + soft->ftop = 0; /* We don't keep top in the status word internally. */ + soft->twd = 0xffff; /* The behaviour is different from that detailed in Section 15.1.6 of the Intel manual */ - operand_address.offset = 0; - operand_address.selector = 0; - instruction_address.offset = 0; - instruction_address.selector = 0; - instruction_address.opcode = 0; - no_ip_update = 1; + oaddr = (struct address *)&soft->foo; + oaddr->offset = 0; + oaddr->selector = 0; + iaddr = (struct address *)&soft->fip; + iaddr->offset = 0; + iaddr->selector = 0; + iaddr->opcode = 0; + soft->no_update = 1; +} + +void finit(void) +{ + finit_task(current); } /* |