]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/cpu/addon_cpuid_features.c
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6] / arch / x86 / kernel / cpu / addon_cpuid_features.c
index c2e1ce33c7cb0e9a9bdab5d16c204c9a83447f7a..a6ef672adbbae01e8da2abb5bf2ae1cb32c091be 100644 (file)
@@ -1,9 +1,7 @@
-
 /*
  *     Routines to indentify additional cpu features that are scattered in
  *     cpuid space.
  */
-
 #include <linux/cpu.h>
 
 #include <asm/pat.h>
@@ -53,19 +51,33 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
 #ifdef CONFIG_X86_PAT
 void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
 {
+       if (!cpu_has_pat)
+               pat_disable("PAT not supported by CPU.");
+
        switch (c->x86_vendor) {
-       case X86_VENDOR_AMD:
-               if (c->x86 >= 0xf && c->x86 <= 0x11)
-                       return;
-               break;
        case X86_VENDOR_INTEL:
-               if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
+               /*
+                * There is a known erratum on Pentium III and Core Solo
+                * and Core Duo CPUs.
+                * " Page with PAT set to WC while associated MTRR is UC
+                *   may consolidate to UC "
+                * Because of this erratum, it is better to stick with
+                * setting WC in MTRR rather than using PAT on these CPUs.
+                *
+                * Enable PAT WC only on P4, Core 2 or later CPUs.
+                */
+               if (c->x86 > 0x6 || (c->x86 == 6 && c->x86_model >= 15))
                        return;
-               break;
+
+               pat_disable("PAT WC disabled due to known CPU erratum.");
+               return;
+
+       case X86_VENDOR_AMD:
+       case X86_VENDOR_CENTAUR:
+       case X86_VENDOR_TRANSMETA:
+               return;
        }
 
-       pat_disable(cpu_has_pat ?
-                   "PAT disabled. Not yet verified on this CPU type." :
-                   "PAT not supported by CPU.");
+       pat_disable("PAT disabled. Not yet verified on this CPU type.");
 }
 #endif