Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[deliverable/linux.git] / arch / x86 / kernel / cpu / addon_cpuid_features.c
index 3e91d3ee26ec68da1601385f375ac70b09a8d27a..c2e1ce33c7cb0e9a9bdab5d16c204c9a83447f7a 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/cpu.h>
 
+#include <asm/pat.h>
 #include <asm/processor.h>
 
 struct cpuid_bit {
@@ -45,6 +46,26 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
                        &regs[CR_ECX], &regs[CR_EDX]);
 
                if (regs[cb->reg] & (1 << cb->bit))
-                       set_bit(cb->feature, c->x86_capability);
+                       set_cpu_cap(c, cb->feature);
        }
 }
+
+#ifdef CONFIG_X86_PAT
+void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
+{
+       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))
+                       return;
+               break;
+       }
+
+       pat_disable(cpu_has_pat ?
+                   "PAT disabled. Not yet verified on this CPU type." :
+                   "PAT not supported by CPU.");
+}
+#endif
This page took 0.026411 seconds and 5 git commands to generate.