diff options
author | Robert Richter <robert.richter@amd.com> | 2010-02-26 17:20:55 +0100 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-05-04 11:35:28 +0200 |
commit | 8617f98c001d00b176422d707e6a67b88bcd7e0d (patch) | |
tree | e857f11dcbc6e650f4d0c30839099358c814e537 /arch/x86/oprofile/nmi_int.c | |
parent | oprofile/x86: moving shutdown functions (diff) | |
download | linux-8617f98c001d00b176422d707e6a67b88bcd7e0d.tar.xz linux-8617f98c001d00b176422d707e6a67b88bcd7e0d.zip |
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) */ /* Assume saved/restored counters are the same on all CPUs */ - model->fill_in_addresses(&per_cpu(cpu_msrs, 0)); + err = model->fill_in_addresses(&per_cpu(cpu_msrs, 0)); + if (err) + goto fail; + for_each_possible_cpu(cpu) { if (!cpu) continue; |