|
@@ -87,6 +87,16 @@ void arch_task_cache_init(void)
|
|
SLAB_PANIC | SLAB_NOTRACK, NULL);
|
|
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..
|
|
* Free current thread data structures etc..
|
|
*/
|
|
*/
|
|
@@ -109,6 +119,8 @@ void exit_thread(void)
|
|
put_cpu();
|
|
put_cpu();
|
|
kfree(bp);
|
|
kfree(bp);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ drop_fpu(me);
|
|
}
|
|
}
|
|
|
|
|
|
void show_regs(struct pt_regs *regs)
|
|
void show_regs(struct pt_regs *regs)
|
|
@@ -149,12 +161,7 @@ void flush_thread(void)
|
|
|
|
|
|
flush_ptrace_hw_breakpoint(tsk);
|
|
flush_ptrace_hw_breakpoint(tsk);
|
|
memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
|
|
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)
|
|
static void hard_disable_TSC(void)
|