perf_counter: unify and fix delayed counter wakeup
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / arch / x86 / kernel / cpu / perf_counter.c
index 3f95b0cdc550e1ed5ad351379c9d131c96dd9941..7aab177fb566378ab40a815dd8c073b7ce367b1f 100644 (file)
@@ -227,7 +227,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
                 */
                hwc->config |= pmc_ops->event_map(perf_event_id(hw_event));
        }
-       counter->wakeup_pending = 0;
 
        return 0;
 }
@@ -773,34 +772,6 @@ void smp_perf_counter_interrupt(struct pt_regs *regs)
        irq_exit();
 }
 
-/*
- * This handler is triggered by NMI contexts:
- */
-void perf_counter_notify(struct pt_regs *regs)
-{
-       struct cpu_hw_counters *cpuc;
-       unsigned long flags;
-       int bit, cpu;
-
-       local_irq_save(flags);
-       cpu = smp_processor_id();
-       cpuc = &per_cpu(cpu_hw_counters, cpu);
-
-       for_each_bit(bit, cpuc->used, X86_PMC_IDX_MAX) {
-               struct perf_counter *counter = cpuc->counters[bit];
-
-               if (!counter)
-                       continue;
-
-               if (counter->wakeup_pending) {
-                       counter->wakeup_pending = 0;
-                       wake_up(&counter->waitq);
-               }
-       }
-
-       local_irq_restore(flags);
-}
-
 void perf_counters_lapic_init(int nmi)
 {
        u32 apic_val;