diff options
author | Jaswinder Singh Rajput <jaswinder@kernel.org> | 2009-06-11 05:58:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-13 06:58:25 -0400 |
commit | 4d2be1267fcfb3a4d2198fd696aec5e3dcbce60e (patch) | |
tree | 18d01f008ed0ae174539be7a69253a8b93a8384e /arch/x86/kernel | |
parent | d5e8da6449d4ef4bac35ea9b9719a2cda02e7b39 (diff) |
perf_counter, x86: Check old-AMD performance monitoring support
AMD supports performance monitoring start from K7 (i.e. family 6),
so disable it for earlier AMD CPUs.
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1244714289.6923.0.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 275bc142cd5d..3c37c3930ca1 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -1459,6 +1459,10 @@ static int intel_pmu_init(void) | |||
1459 | 1459 | ||
1460 | static int amd_pmu_init(void) | 1460 | static int amd_pmu_init(void) |
1461 | { | 1461 | { |
1462 | /* Performance-monitoring supported from K7 and later: */ | ||
1463 | if (boot_cpu_data.x86 < 6) | ||
1464 | return -ENODEV; | ||
1465 | |||
1462 | x86_pmu = amd_pmu; | 1466 | x86_pmu = amd_pmu; |
1463 | 1467 | ||
1464 | switch (boot_cpu_data.x86) { | 1468 | switch (boot_cpu_data.x86) { |