diff options
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 491e737ce547..aa0987088774 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) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | /* Needs to be externally visible */ | 32 | /* Needs to be externally visible */ |
33 | void finit(void) | 33 | void finit_task(struct task_struct *tsk) |
34 | { | 34 | { |
35 | control_word = 0x037f; | 35 | struct i387_soft_struct *soft = &tsk->thread.xstate->soft; |
36 | partial_status = 0; | 36 | struct address *oaddr, *iaddr; |
37 | top = 0; /* We don't keep top in the status word internally. */ | 37 | soft->cwd = 0x037f; |
38 | fpu_tag_word = 0xffff; | 38 | soft->swd = 0; |
39 | soft->ftop = 0; /* We don't keep top in the status word internally. */ | ||
40 | soft->twd = 0xffff; | ||
39 | /* The behaviour is different from that detailed in | 41 | /* The behaviour is different from that detailed in |
40 | Section 15.1.6 of the Intel manual */ | 42 | Section 15.1.6 of the Intel manual */ |
41 | operand_address.offset = 0; | 43 | oaddr = (struct address *)&soft->foo; |
42 | operand_address.selector = 0; | 44 | oaddr->offset = 0; |
43 | instruction_address.offset = 0; | 45 | oaddr->selector = 0; |
44 | instruction_address.selector = 0; | 46 | iaddr = (struct address *)&soft->fip; |
45 | instruction_address.opcode = 0; | 47 | iaddr->offset = 0; |
46 | no_ip_update = 1; | 48 | iaddr->selector = 0; |
49 | iaddr->opcode = 0; | ||
50 | soft->no_update = 1; | ||
51 | } | ||
52 | |||
53 | void finit(void) | ||
54 | { | ||
55 | finit_task(current); | ||
47 | } | 56 | } |
48 | 57 | ||
49 | /* | 58 | /* |