diff options
Diffstat (limited to 'drivers/xen')
-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 1cd2a0e15ae8..891d2e90753a 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -341,7 +341,7 @@ static int find_unbound_irq(void) | |||
341 | if (irq == nr_irqs) | 341 | if (irq == nr_irqs) |
342 | panic("No available IRQ to bind to: increase nr_irqs!\n"); | 342 | panic("No available IRQ to bind to: increase nr_irqs!\n"); |
343 | 343 | ||
344 | desc = irq_to_desc_alloc_cpu(irq, 0); | 344 | desc = irq_to_desc_alloc_node(irq, 0); |
345 | if (WARN_ON(desc == NULL)) | 345 | if (WARN_ON(desc == NULL)) |
346 | return -1; | 346 | return -1; |
347 | 347 | ||
@@ -694,13 +694,13 @@ void rebind_evtchn_irq(int evtchn, int irq) | |||
694 | } | 694 | } |
695 | 695 | ||
696 | /* Rebind an evtchn so that it gets delivered to a specific cpu */ | 696 | /* Rebind an evtchn so that it gets delivered to a specific cpu */ |
697 | static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | 697 | static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu) |
698 | { | 698 | { |
699 | struct evtchn_bind_vcpu bind_vcpu; | 699 | struct evtchn_bind_vcpu bind_vcpu; |
700 | int evtchn = evtchn_from_irq(irq); | 700 | int evtchn = evtchn_from_irq(irq); |
701 | 701 | ||
702 | if (!VALID_EVTCHN(evtchn)) | 702 | if (!VALID_EVTCHN(evtchn)) |
703 | return; | 703 | return -1; |
704 | 704 | ||
705 | /* Send future instances of this interrupt to other vcpu. */ | 705 | /* Send future instances of this interrupt to other vcpu. */ |
706 | bind_vcpu.port = evtchn; | 706 | bind_vcpu.port = evtchn; |
@@ -713,13 +713,15 @@ static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | |||
713 | */ | 713 | */ |
714 | if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) | 714 | if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) |
715 | bind_evtchn_to_cpu(evtchn, tcpu); | 715 | bind_evtchn_to_cpu(evtchn, tcpu); |
716 | } | ||
717 | 716 | ||
717 | return 0; | ||
718 | } | ||
718 | 719 | ||
719 | static void set_affinity_irq(unsigned irq, const struct cpumask *dest) | 720 | static int set_affinity_irq(unsigned irq, const struct cpumask *dest) |
720 | { | 721 | { |
721 | unsigned tcpu = cpumask_first(dest); | 722 | unsigned tcpu = cpumask_first(dest); |
722 | rebind_irq_to_cpu(irq, tcpu); | 723 | |
724 | return rebind_irq_to_cpu(irq, tcpu); | ||
723 | } | 725 | } |
724 | 726 | ||
725 | int resend_irq_on_evtchn(unsigned int irq) | 727 | int resend_irq_on_evtchn(unsigned int irq) |