Commit 7d88d32a4670af583c896e5ecd3929b78538ca62
Committed by
Thomas Gleixner
1 parent
6b9b732d0e
Exists in
master
and in
7 other branches
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: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Showing 1 changed file with 12 additions and 11 deletions Side-by-side Diff
drivers/xen/xenbus/xenbus_comms.c
... | ... | @@ -203,7 +203,6 @@ |
203 | 203 | int xb_init_comms(void) |
204 | 204 | { |
205 | 205 | struct xenstore_domain_interface *intf = xen_store_interface; |
206 | - int err; | |
207 | 206 | |
208 | 207 | if (intf->req_prod != intf->req_cons) |
209 | 208 | printk(KERN_ERR "XENBUS request ring is not quiescent " |
210 | 209 | |
211 | 210 | |
... | ... | @@ -216,18 +215,20 @@ |
216 | 215 | intf->rsp_cons = intf->rsp_prod; |
217 | 216 | } |
218 | 217 | |
219 | - if (xenbus_irq) | |
220 | - unbind_from_irqhandler(xenbus_irq, &xb_waitq); | |
218 | + if (xenbus_irq) { | |
219 | + /* Already have an irq; assume we're resuming */ | |
220 | + rebind_evtchn_irq(xen_store_evtchn, xenbus_irq); | |
221 | + } else { | |
222 | + int err; | |
223 | + err = bind_evtchn_to_irqhandler(xen_store_evtchn, wake_waiting, | |
224 | + 0, "xenbus", &xb_waitq); | |
225 | + if (err <= 0) { | |
226 | + printk(KERN_ERR "XENBUS request irq failed %i\n", err); | |
227 | + return err; | |
228 | + } | |
221 | 229 | |
222 | - err = bind_evtchn_to_irqhandler( | |
223 | - xen_store_evtchn, wake_waiting, | |
224 | - 0, "xenbus", &xb_waitq); | |
225 | - if (err <= 0) { | |
226 | - printk(KERN_ERR "XENBUS request irq failed %i\n", err); | |
227 | - return err; | |
230 | + xenbus_irq = err; | |
228 | 231 | } |
229 | - | |
230 | - xenbus_irq = err; | |
231 | 232 | |
232 | 233 | return 0; |
233 | 234 | } |