x86: Unify APERF/MPERF support
Initialize this CPUID flag feature in common code. It could be made a standalone function later, maybe, if more functionality is duplicated. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> LKML-Reference: <1270065406-1814-4-git-send-email-bp@amd64.org> Reviewed-by: Thomas Renninger <trenn@suse.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:

committed by
H. Peter Anvin

parent
73860c6b2f
commit
d65ad45cd8
@@ -352,12 +352,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
|
||||
set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
|
||||
}
|
||||
|
||||
if (c->cpuid_level > 6) {
|
||||
unsigned ecx = cpuid_ecx(6);
|
||||
if (ecx & 0x01)
|
||||
set_cpu_cap(c, X86_FEATURE_APERFMPERF);
|
||||
}
|
||||
|
||||
if (cpu_has_xmm2)
|
||||
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
|
||||
if (cpu_has_ds) {
|
||||
|
Reference in New Issue
Block a user