irq_work.c 538 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * x86 specific code for irq_work
  3. *
  4. * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
  5. */
  6. #include <linux/kernel.h>
  7. #include <linux/irq_work.h>
  8. #include <linux/hardirq.h>
  9. #include <asm/apic.h>
  10. void smp_irq_work_interrupt(struct pt_regs *regs)
  11. {
  12. irq_enter();
  13. ack_APIC_irq();
  14. inc_irq_stat(apic_irq_work_irqs);
  15. irq_work_run();
  16. irq_exit();
  17. }
  18. void arch_irq_work_raise(void)
  19. {
  20. #ifdef CONFIG_X86_LOCAL_APIC
  21. if (!cpu_has_apic)
  22. return;
  23. apic->send_IPI_self(IRQ_WORK_VECTOR);
  24. apic_wait_icr_idle();
  25. #endif
  26. }