diff options
-rw-r--r-- | drivers/xen/events.c | 16 | ||||
-rw-r--r-- | include/xen/events.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 2396b4492f70..4f0f22b020ea 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -586,6 +586,22 @@ static void set_affinity_irq(unsigned irq, cpumask_t dest) | |||
586 | rebind_irq_to_cpu(irq, tcpu); | 586 | rebind_irq_to_cpu(irq, tcpu); |
587 | } | 587 | } |
588 | 588 | ||
589 | int resend_irq_on_evtchn(unsigned int irq) | ||
590 | { | ||
591 | int masked, evtchn = evtchn_from_irq(irq); | ||
592 | struct shared_info *s = HYPERVISOR_shared_info; | ||
593 | |||
594 | if (!VALID_EVTCHN(evtchn)) | ||
595 | return 1; | ||
596 | |||
597 | masked = sync_test_and_set_bit(evtchn, s->evtchn_mask); | ||
598 | sync_set_bit(evtchn, s->evtchn_pending); | ||
599 | if (!masked) | ||
600 | unmask_evtchn(evtchn); | ||
601 | |||
602 | return 1; | ||
603 | } | ||
604 | |||
589 | static void enable_dynirq(unsigned int irq) | 605 | static void enable_dynirq(unsigned int irq) |
590 | { | 606 | { |
591 | int evtchn = evtchn_from_irq(irq); | 607 | int evtchn = evtchn_from_irq(irq); |
diff --git a/include/xen/events.h b/include/xen/events.h index d99a3e0df880..acd8e062c85f 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -31,6 +31,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi, | |||
31 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); | 31 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); |
32 | 32 | ||
33 | void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); | 33 | void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); |
34 | int resend_irq_on_evtchn(unsigned int irq); | ||
34 | 35 | ||
35 | static inline void notify_remote_via_evtchn(int port) | 36 | static inline void notify_remote_via_evtchn(int port) |
36 | { | 37 | { |