x86, pat: New i/f for driver to request memtype for IO regions
[safe/jmp/linux-2.6] / arch / x86 / boot / cpu.c
index 00e19ed..6ec6bb6 100644 (file)
@@ -16,9 +16,6 @@
  */
 
 #include "boot.h"
-#include "bitops.h"
-#include <asm/cpufeature.h>
-
 #include "cpustr.h"
 
 static char *cpu_name(int level)
@@ -28,6 +25,8 @@ static char *cpu_name(int level)
        if (level == 64) {
                return "x86-64";
        } else {
+               if (level == 15)
+                       level = 6;
                sprintf(buf, "i%d86", level);
                return buf;
        }
@@ -60,17 +59,18 @@ int validate_cpu(void)
                        u32 e = err_flags[i];
 
                        for (j = 0; j < 32; j++) {
-                               int n = (i << 5)+j;
-                               if (*msg_strs < n) {
+                               if (msg_strs[0] < i ||
+                                   (msg_strs[0] == i && msg_strs[1] < j)) {
                                        /* Skip to the next string */
-                                       do {
-                                               msg_strs++;
-                                       } while (*msg_strs);
-                                       msg_strs++;
+                                       msg_strs += 2;
+                                       while (*msg_strs++)
+                                               ;
                                }
                                if (e & 1) {
-                                       if (*msg_strs == n && msg_strs[1])
-                                               printf("%s ", msg_strs+1);
+                                       if (msg_strs[0] == i &&
+                                           msg_strs[1] == j &&
+                                           msg_strs[2])
+                                               printf("%s ", msg_strs+2);
                                        else
                                                printf("%d:%d ", i, j);
                                }