diff options
author | Tony Lindgren <tony@atomide.com> | 2013-06-07 15:05:36 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-06-07 15:05:36 -0700 |
commit | 17f545ca1769e268e0190d88ab94dc2a117df280 (patch) | |
tree | 34b06d75d4c95823f7dbb0017142e5b59cd88f1b /arch/x86/kernel/i387.c | |
parent | 2d403f7b198163d14a37ab79de33e27e390bb3b1 (diff) | |
parent | 8341613afbc8d65bca8c81158edfb49f36b7ad92 (diff) | |
download | linux-17f545ca1769e268e0190d88ab94dc2a117df280.tar.gz linux-17f545ca1769e268e0190d88ab94dc2a117df280.tar.bz2 linux-17f545ca1769e268e0190d88ab94dc2a117df280.zip |
Merge branch 'dts-fixes-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt into omap-for-v3.10/fixes
Diffstat (limited to 'arch/x86/kernel/i387.c')
-rw-r--r-- | arch/x86/kernel/i387.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 245a71db401a..cb339097b9ea 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c @@ -22,23 +22,19 @@ /* * Were we in an interrupt that interrupted kernel mode? * - * For now, with eagerfpu we will return interrupted kernel FPU - * state as not-idle. TBD: Ideally we can change the return value - * to something like __thread_has_fpu(current). But we need to - * be careful of doing __thread_clear_has_fpu() before saving - * the FPU etc for supporting nested uses etc. For now, take - * the simple route! - * * On others, we can do a kernel_fpu_begin/end() pair *ONLY* if that * pair does nothing at all: the thread must not have fpu (so * that we don't try to save the FPU state), and TS must * be set (so that the clts/stts pair does nothing that is * visible in the interrupted kernel thread). + * + * Except for the eagerfpu case when we return 1 unless we've already + * been eager and saved the state in kernel_fpu_begin(). */ static inline bool interrupted_kernel_fpu_idle(void) { if (use_eager_fpu()) - return 0; + return __thread_has_fpu(current); return !__thread_has_fpu(current) && (read_cr0() & X86_CR0_TS); @@ -78,8 +74,8 @@ void __kernel_fpu_begin(void) struct task_struct *me = current; if (__thread_has_fpu(me)) { - __save_init_fpu(me); __thread_clear_has_fpu(me); + __save_init_fpu(me); /* We do 'stts()' in __kernel_fpu_end() */ } else if (!use_eager_fpu()) { this_cpu_write(fpu_owner_task, NULL); |