diff options
| author | Andy Lutomirski <luto@kernel.org> | 2016-01-24 17:38:09 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-02-09 09:42:56 -0500 |
| commit | c6ab109f7e0eae3bae3bb10f8ddb0df67735c150 (patch) | |
| tree | 3afec625df2ba21a6bd7913ada3c6599d13f463d | |
| parent | a20d7297045f7fdcd676c15243192eb0e95a4306 (diff) | |
x86/fpu: Speed up lazy FPU restores slightly
If we have an FPU, there's no need to check CR0 for FPU emulation.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: yu-cheng yu <yu-cheng.yu@intel.com>
Link: http://lkml.kernel.org/r/980004297e233c27066d54e71382c44cdd36ef7c.1453675014.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
| -rw-r--r-- | arch/x86/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 87f80febf477..36a9c017540e 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
| @@ -752,7 +752,7 @@ do_device_not_available(struct pt_regs *regs, long error_code) | |||
| 752 | RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); | 752 | RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); |
| 753 | 753 | ||
| 754 | #ifdef CONFIG_MATH_EMULATION | 754 | #ifdef CONFIG_MATH_EMULATION |
| 755 | if (read_cr0() & X86_CR0_EM) { | 755 | if (!boot_cpu_has(X86_FEATURE_FPU) && (read_cr0() & X86_CR0_EM)) { |
| 756 | struct math_emu_info info = { }; | 756 | struct math_emu_info info = { }; |
| 757 | 757 | ||
| 758 | conditional_sti(regs); | 758 | conditional_sti(regs); |
