summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head_32.S
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-12-07 17:02:47 +0000
committerGrant Likely <grant.likely@secretlab.ca>2012-12-07 17:02:47 +0000
commit7730cba2a50332c194f50a58b86359ea39a82bd1 (patch)
tree64c8d7228da1454c02288068e57a9c61f8b0acd0 /arch/x86/kernel/head_32.S
parentc20151dff8a6d503c0d0cc4387c33a618cdabcb7 (diff)
parentb69f0859dc8e633c5d8c06845811588fe17e68b3 (diff)
downloadblackbird-op-linux-7730cba2a50332c194f50a58b86359ea39a82bd1.tar.gz
blackbird-op-linux-7730cba2a50332c194f50a58b86359ea39a82bd1.zip
Merge tag 'v3.7-rc8' into spi/next
Linux 3.7-rc8
Diffstat (limited to 'arch/x86/kernel/head_32.S')
-rw-r--r--arch/x86/kernel/head_32.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 957a47aec64e..4dac2f68ed4a 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -292,8 +292,8 @@ default_entry:
* be using the global pages.
*
* NOTE! If we are on a 486 we may have no cr4 at all!
- * Specifically, cr4 exists if and only if CPUID exists,
- * which in turn exists if and only if EFLAGS.ID exists.
+ * Specifically, cr4 exists if and only if CPUID exists
+ * and has flags other than the FPU flag set.
*/
movl $X86_EFLAGS_ID,%ecx
pushl %ecx
@@ -308,6 +308,11 @@ default_entry:
testl %ecx,%eax
jz 6f # No ID flag = no CPUID = no CR4
+ movl $1,%eax
+ cpuid
+ andl $~1,%edx # Ignore CPUID.FPU
+ jz 6f # No flags or only CPUID.FPU = no CR4
+
movl pa(mmu_cr4_features),%eax
movl %eax,%cr4
OpenPOWER on IntegriCloud