aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 12:45:46 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 12:47:14 -0400
commit8ccb3dcd1f8e80e8702642e1de26541b52f6bb7c (patch)
treead03dadb63ee1fbc70e271b4962b91b376058040 /arch
parent63c422afe3739b68bec0b5c42807d1450c951caf (diff)
x86: Fix booting with "no387 nofxsr"
Jesper Juhl reported that testing the software math-emulation by forcing "no387" doesn't work on modern CPU's. The reason was two-fold: - you also need to pass in "nofxsr" to make sure that we not only don't touch the old i387 legacy hardware, it also needs to disable the modern XMM/FXSR sequences - "nofxsr" didn't actually clear the capability bits immediately, leaving the early boot sequence still using FXSR until we got to the identify_cpu() stage. This fixes the "nofxsr" flag to take effect immediately on the boot CPU. Debugging by Randy Dunlap Acked-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Jesper Juhl <jesper.juhl@gmail.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 2799baaadf45..b2f24d57fddd 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -184,7 +184,16 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early)
184 184
185static int __init x86_fxsr_setup(char * s) 185static int __init x86_fxsr_setup(char * s)
186{ 186{
187 /* Tell all the other CPU's to not use it... */
187 disable_x86_fxsr = 1; 188 disable_x86_fxsr = 1;
189
190 /*
191 * ... and clear the bits early in the boot_cpu_data
192 * so that the bootup process doesn't try to do this
193 * either.
194 */
195 clear_bit(X86_FEATURE_FXSR, boot_cpu_data.x86_capability);
196 clear_bit(X86_FEATURE_XMM, boot_cpu_data.x86_capability);
188 return 1; 197 return 1;
189} 198}
190__setup("nofxsr", x86_fxsr_setup); 199__setup("nofxsr", x86_fxsr_setup);