aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2009-04-29 06:46:58 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-29 08:51:00 -0400
commitda1a776be1ac7f78bb30ececbec4c1383163b079 (patch)
tree5b7c38811d175ff53f769a537a80fe111fabfd25 /arch
parente7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a (diff)
perf_counter, x86: remove X86_FEATURE_ARCH_PERFMON flag for AMD cpus
X86_FEATURE_ARCH_PERFMON is an Intel hardware feature that does not work on AMD CPUs. The flag is now only used in Intel specific code (especially initialization). [ Impact: refactor code ] Signed-off-by: Robert Richter <robert.richter@amd.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1241002046-8832-2-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/amd.c4
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c6
2 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index fd69c514ca2..7e4a459daa6 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -420,10 +420,6 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
420 if (c->x86 >= 6) 420 if (c->x86 >= 6)
421 set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK); 421 set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK);
422 422
423 /* Enable Performance counter for K7 and later */
424 if (c->x86 > 6 && c->x86 <= 0x11)
425 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
426
427 if (!c->x86_model_id[0]) { 423 if (!c->x86_model_id[0]) {
428 switch (c->x86) { 424 switch (c->x86) {
429 case 0xf: 425 case 0xf:
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 0fcbaab83f9..7d0f81dcb52 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -949,6 +949,9 @@ static struct pmc_x86_ops *pmc_intel_init(void)
949 unsigned int unused; 949 unsigned int unused;
950 unsigned int ebx; 950 unsigned int ebx;
951 951
952 if (!cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
953 return NULL;
954
952 /* 955 /*
953 * Check whether the Architectural PerfMon supports 956 * Check whether the Architectural PerfMon supports
954 * Branch Misses Retired Event or not. 957 * Branch Misses Retired Event or not.
@@ -987,9 +990,6 @@ static struct pmc_x86_ops *pmc_amd_init(void)
987 990
988void __init init_hw_perf_counters(void) 991void __init init_hw_perf_counters(void)
989{ 992{
990 if (!cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
991 return;
992
993 switch (boot_cpu_data.x86_vendor) { 993 switch (boot_cpu_data.x86_vendor) {
994 case X86_VENDOR_INTEL: 994 case X86_VENDOR_INTEL:
995 pmc_ops = pmc_intel_init(); 995 pmc_ops = pmc_intel_init();