diff options
author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2010-01-18 12:25:36 -0500 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-01-25 09:34:53 -0500 |
commit | d8cc108f4fab42b380c6b3f3356f99e8dd5372e2 (patch) | |
tree | 095a017bf9d97b67be388f4f26e2e647042336e6 /arch | |
parent | 92dcffb916d309aa01778bf8963a6932e4014d07 (diff) |
oprofile/x86: fix crash when profiling more than 28 events
With multiplexing enabled oprofile crashs when profiling more than 28
events. This patch fixes this.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index cb88b1a0bd5f..76d4f566adee 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -222,7 +222,7 @@ static void nmi_cpu_switch(void *dummy) | |||
222 | 222 | ||
223 | /* move to next set */ | 223 | /* move to next set */ |
224 | si += model->num_counters; | 224 | si += model->num_counters; |
225 | if ((si > model->num_virt_counters) || (counter_config[si].count == 0)) | 225 | if ((si >= model->num_virt_counters) || (counter_config[si].count == 0)) |
226 | per_cpu(switch_index, cpu) = 0; | 226 | per_cpu(switch_index, cpu) = 0; |
227 | else | 227 | else |
228 | per_cpu(switch_index, cpu) = si; | 228 | per_cpu(switch_index, cpu) = si; |