Linux 3.8-rc7
[cris-mirror.git] / arch / x86 / kernel / irq_work.c
blobca8f703a1e70bdaf219bdcdd215ac2e1724bfda6
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>
12 void smp_irq_work_interrupt(struct pt_regs *regs)
14 irq_enter();
15 ack_APIC_irq();
16 inc_irq_stat(apic_irq_work_irqs);
17 irq_work_run();
18 irq_exit();
21 void arch_irq_work_raise(void)
23 #ifdef CONFIG_X86_LOCAL_APIC
24 if (!cpu_has_apic)
25 return;
27 apic->send_IPI_self(IRQ_WORK_VECTOR);
28 apic_wait_icr_idle();
29 #endif