aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-09-18 19:55:29 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-09-18 20:13:18 -0400
commit0edce91dcd83160019867a00746c679344dc0bbd (patch)
tree91095d3b81e6c5f2eafb0da0b2b7ee1252d8aff9 /drivers/xen
parent93afe0b75ef3675ca05320919a57de8b9bbb159c (diff)
xen/evtchn: ports start enabled
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
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);