summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-15 19:37:10 -0700
committerDavid S. Miller <davem@davemloft.net>2011-03-15 19:37:10 -0700
commite0da2481fc00e031c04480b9dc88fae9eff39a19 (patch)
tree7a4a24adaf7e1bdff3b79866e8c6fd9fa364729b /drivers/xen
parent5f86cad1e8224af9e3b9b43dd84b146a9ff0df87 (diff)
parent2e820f58f7ad8eaca2f194ccdfea0de63e9c6d78 (diff)
downloadlinux-e0da2481fc00e031c04480b9dc88fae9eff39a19.tar.bz2
Merge branch 'stable/backends' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c38
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)
return irq;
}
+static int bind_interdomain_evtchn_to_irq(unsigned int remote_domain,
+ unsigned int remote_port)
+{
+ struct evtchn_bind_interdomain bind_interdomain;
+ int err;
+
+ bind_interdomain.remote_dom = remote_domain;
+ bind_interdomain.remote_port = remote_port;
+
+ err = HYPERVISOR_event_channel_op(EVTCHNOP_bind_interdomain,
+ &bind_interdomain);
+
+ return err ? : bind_evtchn_to_irq(bind_interdomain.local_port);
+}
+
int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
{
@@ -959,6 +974,29 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn,
}
EXPORT_SYMBOL_GPL(bind_evtchn_to_irqhandler);
+int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain,
+ unsigned int remote_port,
+ irq_handler_t handler,
+ unsigned long irqflags,
+ const char *devname,
+ void *dev_id)
+{
+ int irq, retval;
+
+ irq = bind_interdomain_evtchn_to_irq(remote_domain, remote_port);
+ if (irq < 0)
+ return irq;
+
+ retval = request_irq(irq, handler, irqflags, devname, dev_id);
+ if (retval != 0) {
+ unbind_from_irq(irq);
+ return retval;
+ }
+
+ return irq;
+}
+EXPORT_SYMBOL_GPL(bind_interdomain_evtchn_to_irqhandler);
+
int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
irq_handler_t handler,
unsigned long irqflags, const char *devname, void *dev_id)