X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=arch%2Fx86%2Fkernel%2Fcpu%2Faddon_cpuid_features.c;h=84a8220a6072c0425b9da95fbb28b5a309cbfda1;hb=17489c058e8c63ab5ebdc67ab52ca70d1bc270b1;hp=3e91d3ee26ec68da1601385f375ac70b09a8d27a;hpb=1ef3e36251e4edc77a48967d015a87ca3c4283ea;p=pandora-kernel.git diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index 3e91d3ee26ec..84a8220a6072 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c @@ -1,11 +1,10 @@ - /* * Routines to indentify additional cpu features that are scattered in * cpuid space. */ - #include +#include #include struct cpuid_bit { @@ -45,6 +44,27 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) ®s[CR_ECX], ®s[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) +{ + if (!cpu_has_pat) + pat_disable("PAT not supported by CPU."); + + switch (c->x86_vendor) { + case X86_VENDOR_INTEL: + if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) + return; + break; + case X86_VENDOR_AMD: + case X86_VENDOR_CENTAUR: + case X86_VENDOR_TRANSMETA: + return; } + + pat_disable("PAT disabled. Not yet verified on this CPU type."); } +#endif