diff options
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r-- | drivers/xen/events.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 74681478100a..a41601675633 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -864,6 +864,21 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu) | |||
864 | return irq; | 864 | return irq; |
865 | } | 865 | } |
866 | 866 | ||
867 | static int bind_interdomain_evtchn_to_irq(unsigned int remote_domain, | ||
868 | unsigned int remote_port) | ||
869 | { | ||
870 | struct evtchn_bind_interdomain bind_interdomain; | ||
871 | int err; | ||
872 | |||
873 | bind_interdomain.remote_dom = remote_domain; | ||
874 | bind_interdomain.remote_port = remote_port; | ||
875 | |||
876 | err = HYPERVISOR_event_channel_op(EVTCHNOP_bind_interdomain, | ||
877 | &bind_interdomain); | ||
878 | |||
879 | return err ? : bind_evtchn_to_irq(bind_interdomain.local_port); | ||
880 | } | ||
881 | |||
867 | 882 | ||
868 | int bind_virq_to_irq(unsigned int virq, unsigned int cpu) | 883 | int bind_virq_to_irq(unsigned int virq, unsigned int cpu) |
869 | { | 884 | { |
@@ -959,6 +974,29 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn, | |||
959 | } | 974 | } |
960 | EXPORT_SYMBOL_GPL(bind_evtchn_to_irqhandler); | 975 | EXPORT_SYMBOL_GPL(bind_evtchn_to_irqhandler); |
961 | 976 | ||
977 | int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain, | ||
978 | unsigned int remote_port, | ||
979 | irq_handler_t handler, | ||
980 | unsigned long irqflags, | ||
981 | const char *devname, | ||
982 | void *dev_id) | ||
983 | { | ||
984 | int irq, retval; | ||
985 | |||
986 | irq = bind_interdomain_evtchn_to_irq(remote_domain, remote_port); | ||
987 | if (irq < 0) | ||
988 | return irq; | ||
989 | |||
990 | retval = request_irq(irq, handler, irqflags, devname, dev_id); | ||
991 | if (retval != 0) { | ||
992 | unbind_from_irq(irq); | ||
993 | return retval; | ||
994 | } | ||
995 | |||
996 | return irq; | ||
997 | } | ||
998 | EXPORT_SYMBOL_GPL(bind_interdomain_evtchn_to_irqhandler); | ||
999 | |||
962 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | 1000 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, |
963 | irq_handler_t handler, | 1001 | irq_handler_t handler, |
964 | unsigned long irqflags, const char *devname, void *dev_id) | 1002 | unsigned long irqflags, const char *devname, void *dev_id) |