Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315478
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/5] x86/fpu: Speed up lazy FPU restores slightly |
| Date | 2016-01-23 02:00 +0100 |
| Message-ID | <qTUIy-3qs-13@gated-at.bofh.it> (permalink) |
| References | <qTUIx-3qs-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If we have an FPU, there's no need to check CR0 for FPU emulation.
Signed-off-by: Andy Lutomirski <luto@kernel.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] x86/fpu: eagerfpu fixes, speedups, and default enablement Andy Lutomirski <luto@kernel.org> - 2016-01-23 02:00 +0100
[PATCH 2/5] x86/fpu: Fix FNSAVE usage in eagerfpu mode Andy Lutomirski <luto@kernel.org> - 2016-01-23 02:00 +0100
[PATCH 4/5] x86/fpu: Speed up lazy FPU restores slightly Andy Lutomirski <luto@kernel.org> - 2016-01-23 02:00 +0100
Re: [PATCH 4/5] x86/fpu: Speed up lazy FPU restores slightly Borislav Petkov <bp@alien8.de> - 2016-01-23 11:20 +0100
Re: [PATCH 4/5] x86/fpu: Speed up lazy FPU restores slightly Andy Lutomirski <luto@amacapital.net> - 2016-01-23 23:20 +0100
Re: [PATCH 4/5] x86/fpu: Speed up lazy FPU restores slightly Borislav Petkov <bp@alien8.de> - 2016-01-24 00:40 +0100
[PATCH 5/5] x86/fpu: Default eagerfpu=on on all CPUs Andy Lutomirski <luto@kernel.org> - 2016-01-23 02:00 +0100
Re: [PATCH 5/5] x86/fpu: Default eagerfpu=on on all CPUs Borislav Petkov <bp@alien8.de> - 2016-01-23 11:30 +0100
[PATCH 1/5] x86/fpu: Fix math emulation in eager fpu mode Andy Lutomirski <luto@kernel.org> - 2016-01-23 02:00 +0100
Re: [PATCH 1/5] x86/fpu: Fix math emulation in eager fpu mode Borislav Petkov <bp@alien8.de> - 2016-01-23 11:10 +0100
Re: [PATCH 1/5] x86/fpu: Fix math emulation in eager fpu mode Andy Lutomirski <luto@amacapital.net> - 2016-01-23 18:50 +0100
Re: [PATCH 1/5] x86/fpu: Fix math emulation in eager fpu mode Borislav Petkov <bp@alien8.de> - 2016-01-23 19:00 +0100
csiph-web