summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/netback/netback.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/xen/netback/netback.c')
-rw-r--r--sys/dev/xen/netback/netback.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/sys/dev/xen/netback/netback.c b/sys/dev/xen/netback/netback.c
index 9463bad..8f0286c 100644
--- a/sys/dev/xen/netback/netback.c
+++ b/sys/dev/xen/netback/netback.c
@@ -79,14 +79,15 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_kern.h>
#include <machine/_inttypes.h>
-#include <machine/xen/xen-os.h>
-#include <machine/xen/xenvar.h>
-#include <xen/evtchn.h>
+#include <xen/xen-os.h>
+#include <xen/hypervisor.h>
#include <xen/xen_intr.h>
#include <xen/interface/io/netif.h>
#include <xen/xenbus/xenbusvar.h>
+#include <machine/xen/xenvar.h>
+
/*--------------------------- Compile-time Tunables --------------------------*/
/*---------------------------------- Macros ----------------------------------*/
@@ -433,8 +434,8 @@ struct xnb_softc {
/** Xen device handle.*/
long handle;
- /** IRQ mapping for the communication ring event channel. */
- int irq;
+ /** Handle to the communication ring event channel. */
+ xen_intr_handle_t xen_intr_handle;
/**
* \brief Cached value of the front-end's domain id.
@@ -647,10 +648,7 @@ xnb_disconnect(struct xnb_softc *xnb)
int error;
int i;
- if (xnb->irq != 0) {
- unbind_from_irqhandler(xnb->irq);
- xnb->irq = 0;
- }
+ xen_intr_unbind(xnb->xen_intr_handle);
/*
* We may still have another thread currently processing requests. We
@@ -773,13 +771,13 @@ xnb_connect_comms(struct xnb_softc *xnb)
xnb->flags |= XNBF_RING_CONNECTED;
- error =
- bind_interdomain_evtchn_to_irqhandler(xnb->otherend_id,
- xnb->evtchn,
- device_get_nameunit(xnb->dev),
- xnb_intr, /*arg*/xnb,
- INTR_TYPE_BIO | INTR_MPSAFE,
- &xnb->irq);
+ error = xen_intr_bind_remote_port(xnb->dev,
+ xnb->otherend_id,
+ xnb->evtchn,
+ /*filter*/NULL,
+ xnb_intr, /*arg*/xnb,
+ INTR_TYPE_BIO | INTR_MPSAFE,
+ &xnb->xen_intr_handle);
if (error != 0) {
(void)xnb_disconnect(xnb);
xenbus_dev_fatal(xnb->dev, error, "binding event channel");
@@ -1448,7 +1446,7 @@ xnb_intr(void *arg)
RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(txb, notify);
if (notify != 0)
- notify_remote_via_irq(xnb->irq);
+ xen_intr_signal(xnb->xen_intr_handle);
txb->sring->req_event = txb->req_cons + 1;
xen_mb();
@@ -2361,7 +2359,7 @@ xnb_start_locked(struct ifnet *ifp)
RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(rxb, notify);
if ((notify != 0) || (out_of_space != 0))
- notify_remote_via_irq(xnb->irq);
+ xen_intr_signal(xnb->xen_intr_handle);
rxb->sring->req_event = req_prod_local + 1;
xen_mb();
} while (rxb->sring->req_prod != req_prod_local) ;
OpenPOWER on IntegriCloud