]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/x86/kernel/irq_work.c
x86/microcode_intel.h: Define functions and macros for early loading ucode
[mirror_ubuntu-artful-kernel.git] / arch / x86 / kernel / irq_work.c
1 /*
2 * x86 specific code for irq_work
3 *
4 * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
5 */
6
7 #include <linux/kernel.h>
8 #include <linux/irq_work.h>
9 #include <linux/hardirq.h>
10 #include <asm/apic.h>
11
12 void smp_irq_work_interrupt(struct pt_regs *regs)
13 {
14 irq_enter();
15 ack_APIC_irq();
16 inc_irq_stat(apic_irq_work_irqs);
17 irq_work_run();
18 irq_exit();
19 }
20
21 void arch_irq_work_raise(void)
22 {
23 #ifdef CONFIG_X86_LOCAL_APIC
24 if (!cpu_has_apic)
25 return;
26
27 apic->send_IPI_self(IRQ_WORK_VECTOR);
28 apic_wait_icr_idle();
29 #endif
30 }