diff options
Diffstat (limited to 'arch/x86/kernel/cpu/bugs.c')
| -rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 59 | 
1 files changed, 14 insertions, 45 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 92dfec986a4..4112be9a465 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -17,15 +17,6 @@  #include <asm/paravirt.h>  #include <asm/alternative.h> -static int __init no_halt(char *s) -{ -	WARN_ONCE(1, "\"no-hlt\" is deprecated, please use \"idle=poll\"\n"); -	boot_cpu_data.hlt_works_ok = 0; -	return 1; -} - -__setup("no-hlt", no_halt); -  static int __init no_387(char *s)  {  	boot_cpu_data.hard_math = 0; @@ -68,7 +59,7 @@ static void __init check_fpu(void)  	 * trap_init() enabled FXSR and company _before_ testing for FP  	 * problems here.  	 * -	 * Test for the divl bug.. +	 * Test for the divl bug: http://en.wikipedia.org/wiki/Fdiv_bug  	 */  	__asm__("fninit\n\t"  		"fldl %1\n\t" @@ -84,43 +75,12 @@ static void __init check_fpu(void)  	kernel_fpu_end(); -	boot_cpu_data.fdiv_bug = fdiv_bug; -	if (boot_cpu_data.fdiv_bug) +	if (fdiv_bug) { +		set_cpu_bug(&boot_cpu_data, X86_BUG_FDIV);  		pr_warn("Hmm, FPU with FDIV bug\n"); -} - -static void __init check_hlt(void) -{ -	if (boot_cpu_data.x86 >= 5 || paravirt_enabled()) -		return; - -	pr_info("Checking 'hlt' instruction... "); -	if (!boot_cpu_data.hlt_works_ok) { -		pr_cont("disabled\n"); -		return;  	} -	halt(); -	halt(); -	halt(); -	halt(); -	pr_cont("OK\n"); -} - -/* - * Check whether we are able to run this kernel safely on SMP. - * - * - i386 is no longer supported. - * - In order to run on anything without a TSC, we need to be - *   compiled for a i486. - */ - -static void __init check_config(void) -{ -	if (boot_cpu_data.x86 < 4) -		panic("Kernel requires i486+ for 'invlpg' and other features");  } -  void __init check_bugs(void)  {  	identify_boot_cpu(); @@ -128,8 +88,17 @@ void __init check_bugs(void)  	pr_info("CPU: ");  	print_cpu_info(&boot_cpu_data);  #endif -	check_config(); -	check_hlt(); + +	/* +	 * Check whether we are able to run this kernel safely on SMP. +	 * +	 * - i386 is no longer supported. +	 * - In order to run on anything without a TSC, we need to be +	 *   compiled for a i486. +	 */ +	if (boot_cpu_data.x86 < 4) +		panic("Kernel requires i486+ for 'invlpg' and other features"); +  	init_utsname()->machine[1] =  		'0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);  	alternative_instructions();  |