xen: set up IRQ before binding virq to evtchn
Make sure the irq is set up before binding a virq event channel to it. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
parent
b0097adeec
commit
a52521f149
|
@ -436,6 +436,11 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
|
||||||
irq = per_cpu(virq_to_irq, cpu)[virq];
|
irq = per_cpu(virq_to_irq, cpu)[virq];
|
||||||
|
|
||||||
if (irq == -1) {
|
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.virq = virq;
|
||||||
bind_virq.vcpu = cpu;
|
bind_virq.vcpu = cpu;
|
||||||
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
|
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
|
||||||
|
@ -443,11 +448,6 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
|
||||||
BUG();
|
BUG();
|
||||||
evtchn = bind_virq.port;
|
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;
|
evtchn_to_irq[evtchn] = irq;
|
||||||
irq_info[irq] = mk_virq_info(evtchn, virq);
|
irq_info[irq] = mk_virq_info(evtchn, virq);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue