public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] x32, fpu: fix DNA exception during check_fpu()
@ 2011-07-01  0:19 Suresh Siddha
  2011-07-01  0:30 ` [tip:x86/fpu] x86-32, fpu: Fix " tip-bot for Suresh Siddha
  2011-07-01  3:42 ` [patch] x32, fpu: fix " Linus Torvalds
  0 siblings, 2 replies; 3+ messages in thread
From: Suresh Siddha @ 2011-07-01  0:19 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linus Torvalds; +Cc: LKML

From: Suresh Siddha <suresh.b.siddha@intel.com>

Before check_fpu() is called, we have cr0.TS bit set and hence the floating
point code to check the FDIV bug was generating a DNA exception.

Use kernel_fpu_begin()/kernel_fpu_end() around the floating point
code to avoid this unnecessary device not available exception during
boot.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
 arch/x86/kernel/cpu/bugs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 525514c..46674fb 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -62,6 +62,8 @@ static void __init check_fpu(void)
 		return;
 	}
 
+	kernel_fpu_begin();
+
 	/*
 	 * trap_init() enabled FXSR and company _before_ testing for FP
 	 * problems here.
@@ -80,6 +82,8 @@ static void __init check_fpu(void)
 		: "=m" (*&fdiv_bug)
 		: "m" (*&x), "m" (*&y));
 
+	kernel_fpu_end();
+
 	boot_cpu_data.fdiv_bug = fdiv_bug;
 	if (boot_cpu_data.fdiv_bug)
 		printk(KERN_WARNING "Hmm, FPU with FDIV bug.\n");



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-01  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01  0:19 [patch] x32, fpu: fix DNA exception during check_fpu() Suresh Siddha
2011-07-01  0:30 ` [tip:x86/fpu] x86-32, fpu: Fix " tip-bot for Suresh Siddha
2011-07-01  3:42 ` [patch] x32, fpu: fix " Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox