1 /* 2 * x86 specific code for irq_work 3 * 4 * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra 5 */ 6 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> 12 #include <linux/interrupt.h> 13 14 #ifdef CONFIG_X86_LOCAL_APIC 15 __visible void __irq_entry smp_irq_work_interrupt(struct pt_regs *regs) 16 { 17 ipi_entering_ack_irq(); 18 trace_irq_work_entry(IRQ_WORK_VECTOR); 19 inc_irq_stat(apic_irq_work_irqs); 20 irq_work_run(); 21 trace_irq_work_exit(IRQ_WORK_VECTOR); 22 exiting_irq(); 23 } 24 25 void arch_irq_work_raise(void) 26 { 27 if (!arch_irq_work_has_interrupt()) 28 return; 29 30 apic->send_IPI_self(IRQ_WORK_VECTOR); 31 apic_wait_icr_idle(); 32 } 33 #endif 34