Skip to content

Commit 3e7cf5b

Browse files
Suresh SiddhaH. Peter Anvin
authored andcommitted
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>
1 parent b0af8df commit 3e7cf5b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/x86/kernel/cpu/bugs.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ static void __init check_fpu(void)
6262
return;
6363
}
6464

65+
kernel_fpu_begin();
66+
6567
/*
6668
* trap_init() enabled FXSR and company _before_ testing for FP
6769
* problems here.
@@ -80,6 +82,8 @@ static void __init check_fpu(void)
8082
: "=m" (*&fdiv_bug)
8183
: "m" (*&x), "m" (*&y));
8284

85+
kernel_fpu_end();
86+
8387
boot_cpu_data.fdiv_bug = fdiv_bug;
8488
if (boot_cpu_data.fdiv_bug)
8589
printk(KERN_WARNING "Hmm, FPU with FDIV bug.\n");

0 commit comments

Comments
 (0)