aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/evtchn.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
index 709c32d949bf..72dc7f20c5ed 100644
--- a/drivers/xen/evtchn.c
+++ b/drivers/xen/evtchn.c
@@ -108,10 +108,9 @@ irqreturn_t evtchn_interrupt(int irq, void *data)
108 108
109 u = get_port_user(port); 109 u = get_port_user(port);
110 110
111 if (WARN(!get_port_enabled(port), 111 WARN(!get_port_enabled(port),
112 "Interrupt for port %d, but apparently not enabled; per-user %p\n", 112 "Interrupt for port %d, but apparently not enabled; per-user %p\n",
113 port, u)) 113 port, u);
114 goto out;
115 114
116 disable_irq_nosync(irq); 115 disable_irq_nosync(irq);
117 set_port_enabled(port, false); 116 set_port_enabled(port, false);
@@ -127,7 +126,6 @@ irqreturn_t evtchn_interrupt(int irq, void *data)
127 } else 126 } else
128 u->ring_overflow = 1; 127 u->ring_overflow = 1;
129 128
130out:
131 spin_unlock(&port_user_lock); 129 spin_unlock(&port_user_lock);
132 130
133 return IRQ_HANDLED; 131 return IRQ_HANDLED;
@@ -265,6 +263,7 @@ static int evtchn_bind_to_user(struct per_user_data *u, int port)
265 */ 263 */
266 BUG_ON(get_port_user(port) != NULL); 264 BUG_ON(get_port_user(port) != NULL);
267 set_port_user(port, u); 265 set_port_user(port, u);
266 set_port_enabled(port, true); /* start enabled */
268 267
269 rc = bind_evtchn_to_irqhandler(port, evtchn_interrupt, IRQF_DISABLED, 268 rc = bind_evtchn_to_irqhandler(port, evtchn_interrupt, IRQF_DISABLED,
270 u->name, (void *)(unsigned long)port); 269 u->name, (void *)(unsigned long)port);