x86: Fix booting with "no387 nofxsr"
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 16:45:46 +0000 (09:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 16:47:14 +0000 (09:47 -0700)
commit8ccb3dcd1f8e80e8702642e1de26541b52f6bb7c
treead03dadb63ee1fbc70e271b4962b91b376058040
parent63c422afe3739b68bec0b5c42807d1450c951caf
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>
arch/i386/kernel/cpu/common.c