x86: Fix override new_cpu_data.x86 with 486
authorWang YanQing <udknight@gmail.com>
Fri, 28 Jun 2013 14:45:16 +0000 (22:45 +0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 28 Jun 2013 22:27:29 +0000 (15:27 -0700)
We should set X86 to 486 before use cpuid to detect the cpu type, if
we set X86 to 486 after cpuid, then we will get 486 until cpu_detect
runs.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Link: http://lkml.kernel.org/r/20130628144516.GA2177@udknight
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/head_32.S

index e65ddc62e1137a8a6f6f4cab04bfe28b9482e905..fe79573c84b9cbe815e6b916ea02bf7269fbd3a5 100644 (file)
@@ -410,6 +410,7 @@ enable_paging:
 /*
  * Check if it is 486
  */
+       movb $4,X86                     # at least 486
        cmpl $-1,X86_CPUID
        je is486
 
@@ -437,7 +438,6 @@ enable_paging:
        movl %edx,X86_CAPABILITY
 
 is486:
-       movb $4,X86
        movl $0x50022,%ecx      # set AM, WP, NE and MP
        movl %cr0,%eax
        andl $0x80000011,%eax   # Save PG,PE,ET
This page took 0.026443 seconds and 5 git commands to generate.