summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/addon_cpuid_features.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-10 21:10:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-10 21:10:48 -0700
commit3e1b83ab3912a6f583897635bee0a2e0cd1545f7 (patch)
treece89473abe12bd31664ee302a098a46a2079ce95 /arch/x86/kernel/cpu/addon_cpuid_features.c
parent8e3e076c5a78519a9f64cd384e8f18bc21882ce0 (diff)
parent82fd866701881623d69fe280dbac06ddff1fdef9 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: rdc: leds build/config fix x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system) x86: revert commit 709f744 ("x86: bitops asm constraint fixes") x86: restrict keyboard io ports reservation to make ipmi driver work x86: fix fpu restore from sig return x86: remove spew print out about bus to node mapping x86: revert printk format warning change which is for linux-next x86: cleanup PAT cpu validation x86: geode: define geode_has_vsa2() even if CONFIG_MGEODE_LX is not set x86: GEODE: cache results from geode_has_vsa2() and uninline x86: revert geode config dependency
Diffstat (limited to 'arch/x86/kernel/cpu/addon_cpuid_features.c')
-rw-r--r--arch/x86/kernel/cpu/addon_cpuid_features.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index 238468ae1993..c2e1ce33c7cb 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -6,6 +6,7 @@
#include <linux/cpu.h>
+#include <asm/pat.h>
#include <asm/processor.h>
struct cpuid_bit {
@@ -48,3 +49,23 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
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