Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305466
b: refs/heads/master
c: 1dcc8d7
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and H. Peter Anvin committed May 16, 2012
1 parent 91b743b commit e85af6e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d75f1b391f5ef73016d14bc6f7e4725820ebaa5b
refs/heads/master: 1dcc8d7ba235a316a056f993e88f0d18b92c60d9
19 changes: 13 additions & 6 deletions trunk/arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ void arch_task_cache_init(void)
SLAB_PANIC | SLAB_NOTRACK, NULL);
}

static inline void drop_fpu(struct task_struct *tsk)
{
/*
* Forget coprocessor state..
*/
tsk->fpu_counter = 0;
clear_fpu(tsk);
clear_used_math();
}

/*
* Free current thread data structures etc..
*/
Expand All @@ -109,6 +119,8 @@ void exit_thread(void)
put_cpu();
kfree(bp);
}

drop_fpu(me);
}

void show_regs(struct pt_regs *regs)
Expand Down Expand Up @@ -149,12 +161,7 @@ void flush_thread(void)

flush_ptrace_hw_breakpoint(tsk);
memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
/*
* Forget coprocessor state..
*/
tsk->fpu_counter = 0;
clear_fpu(tsk);
clear_used_math();
drop_fpu(tsk);
}

static void hard_disable_TSC(void)
Expand Down

0 comments on commit e85af6e

Please sign in to comment.