thermal: fix Mediatek thermal controller build
[linux/fpc-iii.git] / arch / x86 / kernel / irq_work.c
blob3512ba607361403e587f417cbce2775cdec428a1
1 /*
2 * x86 specific code for irq_work
4 * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra
5 */
7 #include <linux/kernel.h>
8 #include <linux/irq_work.h>
9 #include <linux/hardirq.h>
10 #include <asm/apic.h>
11 #include <asm/trace/irq_vectors.h>
13 static inline void __smp_irq_work_interrupt(void)
15 inc_irq_stat(apic_irq_work_irqs);
16 irq_work_run();
19 __visible void smp_irq_work_interrupt(struct pt_regs *regs)
21 ipi_entering_ack_irq();
22 __smp_irq_work_interrupt();
23 exiting_irq();
26 __visible void smp_trace_irq_work_interrupt(struct pt_regs *regs)
28 ipi_entering_ack_irq();
29 trace_irq_work_entry(IRQ_WORK_VECTOR);
30 __smp_irq_work_interrupt();
31 trace_irq_work_exit(IRQ_WORK_VECTOR);
32 exiting_irq();
35 void arch_irq_work_raise(void)
37 #ifdef CONFIG_X86_LOCAL_APIC
38 if (!arch_irq_work_has_interrupt())
39 return;
41 apic->send_IPI_self(IRQ_WORK_VECTOR);
42 apic_wait_icr_idle();
43 #endif