[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-c6ab109f7e0eae3bae3bb10f8ddb0df67735c150@git.kernel.org>
Date: Tue, 9 Feb 2016 08:11:16 -0800
From: tip-bot for Andy Lutomirski <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: bp@...en8.de, fenghua.yu@...el.com, torvalds@...ux-foundation.org,
quentin.casasnovas@...cle.com, mingo@...nel.org,
dave.hansen@...ux.intel.com, luto@...nel.org,
sai.praneeth.prakhya@...el.com, linux-kernel@...r.kernel.org,
oleg@...hat.com, luto@...capital.net, yu-cheng.yu@...el.com,
peterz@...radead.org, riel@...hat.com, tglx@...utronix.de,
hpa@...or.com
Subject: [tip:x86/fpu] x86/fpu: Speed up lazy FPU restores slightly
Commit-ID: c6ab109f7e0eae3bae3bb10f8ddb0df67735c150
Gitweb: http://git.kernel.org/tip/c6ab109f7e0eae3bae3bb10f8ddb0df67735c150
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Sun, 24 Jan 2016 14:38:09 -0800
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 9 Feb 2016 15:42:56 +0100
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>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@...cle.com>
Cc: Rik van Riel <riel@...hat.com>
Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: yu-cheng yu <yu-cheng.yu@...el.com>
Link: http://lkml.kernel.org/r/980004297e233c27066d54e71382c44cdd36ef7c.1453675014.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@...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 87f80fe..36a9c01 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 (!boot_cpu_has(X86_FEATURE_FPU) && (read_cr0() & X86_CR0_EM)) {
struct math_emu_info info = { };
conditional_sti(regs);
Powered by blists - more mailing lists