]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/x86/kernel/cpu/addon_cpuid_features.c
x86: Unify APERF/MPERF support
[net-next-2.6.git] / arch / x86 / kernel / cpu / addon_cpuid_features.c
index ead2a1cfa570bc01ae4551301dcddddefae11740..fd1fc1902a4744d6e77f6ee3d9a8cc6cc0bfc6e1 100644 (file)
@@ -54,6 +54,14 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
                if (regs[cb->reg] & (1 << cb->bit))
                        set_cpu_cap(c, cb->feature);
        }
+
+       /*
+        * common AMD/Intel features
+        */
+       if (c->cpuid_level >= 6) {
+               if (cpuid_ecx(6) & 0x1)
+                       set_cpu_cap(c, X86_FEATURE_APERFMPERF);
+       }
 }
 
 /* leaf 0xb SMT level */