perf_counters: account NMI interrupts
[deliverable/linux.git] / arch / x86 / kernel / cpu / perf_counter.c
index 46c436cdd732b6f837aef231fe9bea3612858838..9901e46998d1a59d006eff17111046e0e539ca52 100644 (file)
@@ -495,6 +495,7 @@ static void __smp_perf_counter_interrupt(struct pt_regs *regs, int nmi)
                goto out;
 
 again:
+       inc_irq_stat(apic_perf_irqs);
        ack = status;
        for_each_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) {
                struct perf_counter *counter = cpuc->counters[bit];
@@ -570,7 +571,6 @@ void perf_counter_unthrottle(void)
 void smp_perf_counter_interrupt(struct pt_regs *regs)
 {
        irq_enter();
-       inc_irq_stat(apic_perf_irqs);
        apic_write(APIC_LVTPC, LOCAL_PERF_VECTOR);
        __smp_perf_counter_interrupt(regs, 0);
 
@@ -643,7 +643,9 @@ perf_counter_nmi_handler(struct notifier_block *self,
 }
 
 static __read_mostly struct notifier_block perf_counter_nmi_notifier = {
-       .notifier_call          = perf_counter_nmi_handler
+       .notifier_call          = perf_counter_nmi_handler,
+       .next                   = NULL,
+       .priority               = 1
 };
 
 void __init init_hw_perf_counters(void)
This page took 0.024367 seconds and 5 git commands to generate.