]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/boot/cpucheck.c
x86: cleanup for setup code crashes during IST probe
[linux-2.6-omap-h63xx.git] / arch / x86 / boot / cpucheck.c
index e655a89c5510fc929f787680811eb9ae981a03e1..4b9ae7c567480658ff1e83333a2f8137c887579b 100644 (file)
@@ -9,8 +9,6 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * arch/i386/boot/cpucheck.c
- *
  * Check for obligatory CPU features and abort if the features are not
  * present.  This code should be compilable as 16-, 32- or 64-bit
  * code, so be very careful with types and inline assembly.
 
 #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>
 
-struct cpu_features {
-       int level;              /* Family, or 64 for x86-64 */
-       int model;
-       u32 flags[NCAPINTS];
-};
-
-static struct cpu_features cpu;
+struct cpu_features cpu;
 static u32 cpu_vendor[3];
 static u32 err_flags[NCAPINTS];
 
-#ifdef CONFIG_X86_64
-static const int req_level = 64;
-#elif defined(CONFIG_X86_MINIMUM_CPU_FAMILY)
 static const int req_level = CONFIG_X86_MINIMUM_CPU_FAMILY;
-#else
-static const int req_level = 3;
-#endif
 
 static const u32 req_flags[NCAPINTS] =
 {
@@ -62,27 +46,27 @@ static const u32 req_flags[NCAPINTS] =
        REQUIRED_MASK7,
 };
 
-#define A32(a,b,c,d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
+#define A32(a, b, c, d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
 
 static int is_amd(void)
 {
-       return cpu_vendor[0] == A32('A','u','t','h') &&
-              cpu_vendor[1] == A32('e','n','t','i') &&
-              cpu_vendor[2] == A32('c','A','M','D');
+       return cpu_vendor[0] == A32('A', 'u', 't', 'h') &&
+              cpu_vendor[1] == A32('e', 'n', 't', 'i') &&
+              cpu_vendor[2] == A32('c', 'A', 'M', 'D');
 }
 
 static int is_centaur(void)
 {
-       return cpu_vendor[0] == A32('C','e','n','t') &&
-              cpu_vendor[1] == A32('a','u','r','H') &&
-              cpu_vendor[2] == A32('a','u','l','s');
+       return cpu_vendor[0] == A32('C', 'e', 'n', 't') &&
+              cpu_vendor[1] == A32('a', 'u', 'r', 'H') &&
+              cpu_vendor[2] == A32('a', 'u', 'l', 's');
 }
 
 static int is_transmeta(void)
 {
-       return cpu_vendor[0] == A32('G','e','n','u') &&
-              cpu_vendor[1] == A32('i','n','e','T') &&
-              cpu_vendor[2] == A32('M','x','8','6');
+       return cpu_vendor[0] == A32('G', 'e', 'n', 'u') &&
+              cpu_vendor[1] == A32('i', 'n', 'e', 'T') &&
+              cpu_vendor[2] == A32('M', 'x', '8', '6');
 }
 
 static int has_fpu(void)