aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index c4b543d1a86f..189bf9d7cdab 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -293,7 +293,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
293 return -EACCES; 293 return -EACCES;
294 hwc->nmi = 1; 294 hwc->nmi = 1;
295 } 295 }
296 perf_counters_lapic_init(hwc->nmi);
297 296
298 if (!hwc->irq_period) 297 if (!hwc->irq_period)
299 hwc->irq_period = x86_pmu.max_period; 298 hwc->irq_period = x86_pmu.max_period;
@@ -612,6 +611,8 @@ try_generic:
612 hwc->counter_base = x86_pmu.perfctr; 611 hwc->counter_base = x86_pmu.perfctr;
613 } 612 }
614 613
614 perf_counters_lapic_init(hwc->nmi);
615
615 x86_pmu.disable(hwc, idx); 616 x86_pmu.disable(hwc, idx);
616 617
617 cpuc->counters[idx] = counter; 618 cpuc->counters[idx] = counter;
@@ -1037,7 +1038,7 @@ void __init init_hw_perf_counters(void)
1037 1038
1038 pr_info("... counter mask: %016Lx\n", perf_counter_mask); 1039 pr_info("... counter mask: %016Lx\n", perf_counter_mask);
1039 1040
1040 perf_counters_lapic_init(1); 1041 perf_counters_lapic_init(0);
1041 register_die_notifier(&perf_counter_nmi_notifier); 1042 register_die_notifier(&perf_counter_nmi_notifier);
1042} 1043}
1043 1044