diff options
author | Robert Richter <robert.richter@amd.com> | 2010-02-26 11:20:55 -0500 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-05-04 05:35:28 -0400 |
commit | 8617f98c001d00b176422d707e6a67b88bcd7e0d (patch) | |
tree | e857f11dcbc6e650f4d0c30839099358c814e537 /arch/x86/oprofile/nmi_int.c | |
parent | 83300ce0df6b72e156b386457aa0f0902b8c0a98 (diff) |
oprofile/x86: return -EBUSY if counters are already reserved
In case a counter is already reserved by the watchdog or perf_event
subsystem, oprofile ignored this counters silently. This case is
handled now and oprofile_setup() now reports an error.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/nmi_int.c')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index c0c21f200faf..9f001d904599 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -357,7 +357,10 @@ static int nmi_setup(void) | |||
357 | */ | 357 | */ |
358 | 358 | ||
359 | /* Assume saved/restored counters are the same on all CPUs */ | 359 | /* Assume saved/restored counters are the same on all CPUs */ |
360 | model->fill_in_addresses(&per_cpu(cpu_msrs, 0)); | 360 | err = model->fill_in_addresses(&per_cpu(cpu_msrs, 0)); |
361 | if (err) | ||
362 | goto fail; | ||
363 | |||
361 | for_each_possible_cpu(cpu) { | 364 | for_each_possible_cpu(cpu) { |
362 | if (!cpu) | 365 | if (!cpu) |
363 | continue; | 366 | continue; |