[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <93f2a482fce2ac1815d324344d03ff26ceabe439.1453510332.git.luto@kernel.org>
Date: Fri, 22 Jan 2016 16:56:05 -0800
From: Andy Lutomirski <luto@...nel.org>
To: x86@...nel.org, linux-kernel@...r.kernel.org
Cc: Borislav Petkov <bp@...en8.de>, Fenghua Yu <fenghua.yu@...el.com>,
Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
yu-cheng yu <yu-cheng.yu@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Rik van Riel <riel@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>
Subject: [PATCH 4/5] 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@...nel.org>
---
arch/x86/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 87f80febf477..183b300f6a8b 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)
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
#ifdef CONFIG_MATH_EMULATION
- if (read_cr0() & X86_CR0_EM) {
+ if (!cpu_has_fpu && (read_cr0() & X86_CR0_EM)) {
struct math_emu_info info = { };
conditional_sti(regs);
--
2.5.0
Powered by blists - more mailing lists