perf_counter: x86: self-IPI for pending work
[linux-2.6.git] / arch / x86 / kernel / cpu / perf_counter.c
index c74e20d593a77ede26b3c47de5d90b2811ee818b..438415866fe47942589461e9958cf5e0bc46d4a5 100644 (file)
@@ -849,6 +849,20 @@ void smp_perf_counter_interrupt(struct pt_regs *regs)
        irq_exit();
 }
 
+void smp_perf_pending_interrupt(struct pt_regs *regs)
+{
+       irq_enter();
+       ack_APIC_irq();
+       inc_irq_stat(apic_pending_irqs);
+       perf_counter_do_pending();
+       irq_exit();
+}
+
+void set_perf_counter_pending(void)
+{
+       apic->send_IPI_self(LOCAL_PENDING_VECTOR);
+}
+
 void perf_counters_lapic_init(int nmi)
 {
        u32 apic_val;