aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 5bfd30ab3920..c109819c2cb9 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -285,6 +285,7 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
285 return -EACCES; 285 return -EACCES;
286 hwc->nmi = 1; 286 hwc->nmi = 1;
287 } 287 }
288 perf_counters_lapic_init(hwc->nmi);
288 289
289 if (!hwc->irq_period) 290 if (!hwc->irq_period)
290 hwc->irq_period = x86_pmu.max_period; 291 hwc->irq_period = x86_pmu.max_period;
@@ -603,8 +604,6 @@ try_generic:
603 hwc->counter_base = x86_pmu.perfctr; 604 hwc->counter_base = x86_pmu.perfctr;
604 } 605 }
605 606
606 perf_counters_lapic_init(hwc->nmi);
607
608 x86_pmu.disable(hwc, idx); 607 x86_pmu.disable(hwc, idx);
609 608
610 cpuc->counters[idx] = counter; 609 cpuc->counters[idx] = counter;
@@ -1054,7 +1053,7 @@ void __init init_hw_perf_counters(void)
1054 1053
1055 pr_info("... counter mask: %016Lx\n", perf_counter_mask); 1054 pr_info("... counter mask: %016Lx\n", perf_counter_mask);
1056 1055
1057 perf_counters_lapic_init(0); 1056 perf_counters_lapic_init(1);
1058 register_die_notifier(&perf_counter_nmi_notifier); 1057 register_die_notifier(&perf_counter_nmi_notifier);
1059} 1058}
1060 1059