Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191480
b: refs/heads/master
c: d65ad45
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and H. Peter Anvin committed Apr 9, 2010
1 parent f1b5741 commit 2b5d620
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73860c6b2fd159a35637e233d735e36887c266ad
refs/heads/master: d65ad45cd82a0db9544469b8c54f5dc5cafbb2d8
8 changes: 8 additions & 0 deletions trunk/arch/x86/kernel/cpu/addon_cpuid_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/x86/kernel/cpu/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2b5d620

Please sign in to comment.