Skip to content

Commit

Permalink
xen: set up IRQ before binding virq to evtchn
Browse files Browse the repository at this point in the history
Make sure the irq is set up before binding a virq event channel to it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Jeremy Fitzhardinge committed Oct 22, 2010
1 parent b0097ad commit a52521f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,18 +436,18 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
irq = per_cpu(virq_to_irq, cpu)[virq];

if (irq == -1) {
irq = find_unbound_irq();

set_irq_chip_and_handler_name(irq, &xen_percpu_chip,
handle_percpu_irq, "virq");

bind_virq.virq = virq;
bind_virq.vcpu = cpu;
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
&bind_virq) != 0)
BUG();
evtchn = bind_virq.port;

irq = find_unbound_irq();

set_irq_chip_and_handler_name(irq, &xen_percpu_chip,
handle_percpu_irq, "virq");

evtchn_to_irq[evtchn] = irq;
irq_info[irq] = mk_virq_info(evtchn, virq);

Expand Down

0 comments on commit a52521f

Please sign in to comment.