diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2011-07-01 00:19:32 (GMT) |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-07-01 00:29:47 (GMT) |
commit | 3e7cf5b00dd5b577b4ee9b2a66e40fb670ef210b (patch) | |
tree | f49eaaae16aee9f36fe85384fa3e8c8feeb997ab | |
parent | b0af8dfdd67699e25083478c63eedef2e72ebd85 (diff) | |
download | linux-fsl-qoriq-3e7cf5b00dd5b577b4ee9b2a66e40fb670ef210b.tar.xz |
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>
-rw-r--r-- | 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"); |