* [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
* [tip:x86/fpu] x86-32, fpu: Fix DNA exception during check_fpu()
2011-07-01 0:19 [patch] x32, fpu: fix DNA exception during check_fpu() Suresh Siddha
@ 2011-07-01 0:30 ` tip-bot for Suresh Siddha
2011-07-01 3:42 ` [patch] x32, fpu: fix " Linus Torvalds
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Suresh Siddha @ 2011-07-01 0:30 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, suresh.b.siddha, tglx, hpa
Commit-ID: 3e7cf5b00dd5b577b4ee9b2a66e40fb670ef210b
Gitweb: http://git.kernel.org/tip/3e7cf5b00dd5b577b4ee9b2a66e40fb670ef210b
Author: Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Thu, 30 Jun 2011 17:19:32 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 30 Jun 2011 17:29:47 -0700
x86-32, fpu: Fix DNA exception during check_fpu()
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>
Link: http://lkml.kernel.org/r/1309479572.2665.1372.camel@sbsiddha-MOBL3.sc.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.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
* Re: [patch] x32, fpu: fix DNA exception during check_fpu()
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 ` Linus Torvalds
1 sibling, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2011-07-01 3:42 UTC (permalink / raw)
To: Suresh Siddha; +Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, LKML
On Thu, Jun 30, 2011 at 5:19 PM, Suresh Siddha
<suresh.b.siddha@intel.com> wrote:
>
> 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.
Looks sane to me. I didn't think we were supposed to set the TS bit
this early, but if we do, Ack.
Linus
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.