--- zzzz-none-000/linux-3.10.107/arch/x86/kernel/irq_work.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/x86/kernel/irq_work.c 2021-02-04 17:41:59.000000000 +0000 @@ -1,27 +1,41 @@ /* * x86 specific code for irq_work * - * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra + * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra */ #include #include #include #include +#include -void smp_irq_work_interrupt(struct pt_regs *regs) +static inline void __smp_irq_work_interrupt(void) { - irq_enter(); - ack_APIC_irq(); inc_irq_stat(apic_irq_work_irqs); irq_work_run(); - irq_exit(); +} + +__visible void smp_irq_work_interrupt(struct pt_regs *regs) +{ + ipi_entering_ack_irq(); + __smp_irq_work_interrupt(); + exiting_irq(); +} + +__visible void smp_trace_irq_work_interrupt(struct pt_regs *regs) +{ + ipi_entering_ack_irq(); + trace_irq_work_entry(IRQ_WORK_VECTOR); + __smp_irq_work_interrupt(); + trace_irq_work_exit(IRQ_WORK_VECTOR); + exiting_irq(); } void arch_irq_work_raise(void) { #ifdef CONFIG_X86_LOCAL_APIC - if (!cpu_has_apic) + if (!arch_irq_work_has_interrupt()) return; apic->send_IPI_self(IRQ_WORK_VECTOR);