Merge branch 'akpm'
[linux-2.6/next.git] / arch / x86 / kernel / irq_work.c
blob107754c8d8ec7436ab33df49d5f9d214ee68decc
1 /*
2 * x86 specific code for irq_work
4 * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
5 */
7 #include <linux/kernel.h>
8 #include <linux/irq_work.h>
9 #include <linux/hardirq.h>
10 #include <asm/apic.h>
11 #include <trace/events/irq_vectors.h>
13 void smp_irq_work_interrupt(struct pt_regs *regs)
15 irq_enter();
16 ack_APIC_irq();
17 trace_irq_vector_entry(IRQ_WORK_VECTOR);
18 inc_irq_stat(apic_irq_work_irqs);
19 irq_work_run();
20 trace_irq_vector_exit(IRQ_WORK_VECTOR);
21 irq_exit();
24 void arch_irq_work_raise(void)
26 #ifdef CONFIG_X86_LOCAL_APIC
27 if (!cpu_has_apic)
28 return;
30 apic->send_IPI_self(IRQ_WORK_VECTOR);
31 apic_wait_icr_idle();
32 #endif