提交 7d88d32a 编写于 作者: J Jeremy Fitzhardinge 提交者: Thomas Gleixner

xenbus: rebind irq on restore

When restoring, rebind the existing xenbus irq to the new xenbus event
channel.  (It turns out in practice that this is always the same, and
is never updated on restore.  That's a bug, but Xeno-linux has been
like this for a long time, so it can't really be fixed.)
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 6b9b732d
...@@ -203,7 +203,6 @@ int xb_read(void *data, unsigned len) ...@@ -203,7 +203,6 @@ int xb_read(void *data, unsigned len)
int xb_init_comms(void) int xb_init_comms(void)
{ {
struct xenstore_domain_interface *intf = xen_store_interface; struct xenstore_domain_interface *intf = xen_store_interface;
int err;
if (intf->req_prod != intf->req_cons) if (intf->req_prod != intf->req_cons)
printk(KERN_ERR "XENBUS request ring is not quiescent " printk(KERN_ERR "XENBUS request ring is not quiescent "
...@@ -216,18 +215,20 @@ int xb_init_comms(void) ...@@ -216,18 +215,20 @@ int xb_init_comms(void)
intf->rsp_cons = intf->rsp_prod; intf->rsp_cons = intf->rsp_prod;
} }
if (xenbus_irq) if (xenbus_irq) {
unbind_from_irqhandler(xenbus_irq, &xb_waitq); /* Already have an irq; assume we're resuming */
rebind_evtchn_irq(xen_store_evtchn, xenbus_irq);
} else {
int err;
err = bind_evtchn_to_irqhandler(xen_store_evtchn, wake_waiting,
0, "xenbus", &xb_waitq);
if (err <= 0) {
printk(KERN_ERR "XENBUS request irq failed %i\n", err);
return err;
}
err = bind_evtchn_to_irqhandler( xenbus_irq = err;
xen_store_evtchn, wake_waiting,
0, "xenbus", &xb_waitq);
if (err <= 0) {
printk(KERN_ERR "XENBUS request irq failed %i\n", err);
return err;
} }
xenbus_irq = err;
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册