Browse Source

x86: cleanup for setup code crashes during IST probe

Clean up the code for crashes during SpeedStep probing on older
machines.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
H. Peter Anvin 16 năm trước cách đây
mục cha
commit
c2dcfde827
4 tập tin đã thay đổi với 4 bổ sung8 xóa
  1. 2 2
      arch/x86/boot/boot.h
  2. 0 3
      arch/x86/boot/cpu.c
  3. 0 2
      arch/x86/boot/cpucheck.c
  4. 2 1
      arch/x86/boot/main.c

+ 2 - 2
arch/x86/boot/boot.h

@@ -24,8 +24,8 @@
 #include <linux/edd.h>
 #include <asm/boot.h>
 #include <asm/setup.h>
-
-#define NCAPINTS   8
+#include "bitops.h"
+#include <asm/cpufeature.h>
 
 /* Useful macros */
 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))

+ 0 - 3
arch/x86/boot/cpu.c

@@ -16,9 +16,6 @@
  */
 
 #include "boot.h"
-#include "bitops.h"
-#include <asm/cpufeature.h>
-
 #include "cpustr.h"
 
 static char *cpu_name(int level)

+ 0 - 2
arch/x86/boot/cpucheck.c

@@ -22,10 +22,8 @@
 
 #ifdef _SETUP
 # include "boot.h"
-# include "bitops.h"
 #endif
 #include <linux/types.h>
-#include <asm/cpufeature.h>
 #include <asm/processor-flags.h>
 #include <asm/required-features.h>
 #include <asm/msr-index.h>

+ 2 - 1
arch/x86/boot/main.c

@@ -73,7 +73,8 @@ static void keyboard_set_repeat(void)
  */
 static void query_ist(void)
 {
-	/* Some 486 BIOSes apparently crash on this call */
+	/* Some older BIOSes apparently crash on this call, so filter
+	   it from machines too old to have SpeedStep at all. */
 	if (cpu.level < 6)
 		return;