diff options
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r-- | drivers/xen/events.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 30963af5dba0..be437c2bc942 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -335,7 +335,7 @@ static int find_unbound_irq(void) | |||
335 | if (irq == nr_irqs) | 335 | if (irq == nr_irqs) |
336 | panic("No available IRQ to bind to: increase nr_irqs!\n"); | 336 | panic("No available IRQ to bind to: increase nr_irqs!\n"); |
337 | 337 | ||
338 | desc = irq_to_desc_alloc_cpu(irq, 0); | 338 | desc = irq_to_desc_alloc_node(irq, 0); |
339 | if (WARN_ON(desc == NULL)) | 339 | if (WARN_ON(desc == NULL)) |
340 | return -1; | 340 | return -1; |
341 | 341 | ||
@@ -688,13 +688,13 @@ void rebind_evtchn_irq(int evtchn, int irq) | |||
688 | } | 688 | } |
689 | 689 | ||
690 | /* Rebind an evtchn so that it gets delivered to a specific cpu */ | 690 | /* Rebind an evtchn so that it gets delivered to a specific cpu */ |
691 | static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | 691 | static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu) |
692 | { | 692 | { |
693 | struct evtchn_bind_vcpu bind_vcpu; | 693 | struct evtchn_bind_vcpu bind_vcpu; |
694 | int evtchn = evtchn_from_irq(irq); | 694 | int evtchn = evtchn_from_irq(irq); |
695 | 695 | ||
696 | if (!VALID_EVTCHN(evtchn)) | 696 | if (!VALID_EVTCHN(evtchn)) |
697 | return; | 697 | return -1; |
698 | 698 | ||
699 | /* Send future instances of this interrupt to other vcpu. */ | 699 | /* Send future instances of this interrupt to other vcpu. */ |
700 | bind_vcpu.port = evtchn; | 700 | bind_vcpu.port = evtchn; |
@@ -707,13 +707,15 @@ static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | |||
707 | */ | 707 | */ |
708 | if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) | 708 | if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) |
709 | bind_evtchn_to_cpu(evtchn, tcpu); | 709 | bind_evtchn_to_cpu(evtchn, tcpu); |
710 | } | ||
711 | 710 | ||
711 | return 0; | ||
712 | } | ||
712 | 713 | ||
713 | static void set_affinity_irq(unsigned irq, const struct cpumask *dest) | 714 | static int set_affinity_irq(unsigned irq, const struct cpumask *dest) |
714 | { | 715 | { |
715 | unsigned tcpu = cpumask_first(dest); | 716 | unsigned tcpu = cpumask_first(dest); |
716 | rebind_irq_to_cpu(irq, tcpu); | 717 | |
718 | return rebind_irq_to_cpu(irq, tcpu); | ||
717 | } | 719 | } |
718 | 720 | ||
719 | int resend_irq_on_evtchn(unsigned int irq) | 721 | int resend_irq_on_evtchn(unsigned int irq) |