diff options
-rw-r--r-- | arch/i386/oprofile/nmi_int.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 8e185208dfd4..a7c0783b269a 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c | |||
@@ -131,7 +131,6 @@ static void nmi_save_registers(void * dummy) | |||
131 | { | 131 | { |
132 | int cpu = smp_processor_id(); | 132 | int cpu = smp_processor_id(); |
133 | struct op_msrs * msrs = &cpu_msrs[cpu]; | 133 | struct op_msrs * msrs = &cpu_msrs[cpu]; |
134 | model->fill_in_addresses(msrs); | ||
135 | nmi_cpu_save_registers(msrs); | 134 | nmi_cpu_save_registers(msrs); |
136 | } | 135 | } |
137 | 136 | ||
@@ -195,6 +194,7 @@ static struct notifier_block profile_exceptions_nb = { | |||
195 | static int nmi_setup(void) | 194 | static int nmi_setup(void) |
196 | { | 195 | { |
197 | int err=0; | 196 | int err=0; |
197 | int cpu; | ||
198 | 198 | ||
199 | if (!allocate_msrs()) | 199 | if (!allocate_msrs()) |
200 | return -ENOMEM; | 200 | return -ENOMEM; |
@@ -207,6 +207,13 @@ static int nmi_setup(void) | |||
207 | /* We need to serialize save and setup for HT because the subset | 207 | /* We need to serialize save and setup for HT because the subset |
208 | * of msrs are distinct for save and setup operations | 208 | * of msrs are distinct for save and setup operations |
209 | */ | 209 | */ |
210 | |||
211 | /* Assume saved/restored counters are the same on all CPUs */ | ||
212 | model->fill_in_addresses(&cpu_msrs[0]); | ||
213 | for_each_possible_cpu (cpu) { | ||
214 | if (cpu != 0) | ||
215 | cpu_msrs[cpu] = cpu_msrs[0]; | ||
216 | } | ||
210 | on_each_cpu(nmi_save_registers, NULL, 0, 1); | 217 | on_each_cpu(nmi_save_registers, NULL, 0, 1); |
211 | on_each_cpu(nmi_cpu_setup, NULL, 0, 1); | 218 | on_each_cpu(nmi_cpu_setup, NULL, 0, 1); |
212 | nmi_enabled = 1; | 219 | nmi_enabled = 1; |