diff options
Diffstat (limited to 'drivers/xen/events.c')
| -rw-r--r-- | drivers/xen/events.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 1e3b934a4cf7..6c8193046e0d 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
| @@ -141,8 +141,12 @@ static void init_evtchn_cpu_bindings(void) | |||
| 141 | int i; | 141 | int i; |
| 142 | 142 | ||
| 143 | /* By default all event channels notify CPU#0. */ | 143 | /* By default all event channels notify CPU#0. */ |
| 144 | for_each_irq_desc(i, desc) | 144 | for_each_irq_desc(i, desc) { |
| 145 | if (!desc) | ||
| 146 | continue; | ||
| 147 | |||
| 145 | desc->affinity = cpumask_of_cpu(0); | 148 | desc->affinity = cpumask_of_cpu(0); |
| 149 | } | ||
| 146 | #endif | 150 | #endif |
| 147 | 151 | ||
| 148 | memset(cpu_evtchn, 0, sizeof(cpu_evtchn)); | 152 | memset(cpu_evtchn, 0, sizeof(cpu_evtchn)); |
| @@ -231,7 +235,7 @@ static int find_unbound_irq(void) | |||
| 231 | int irq; | 235 | int irq; |
| 232 | 236 | ||
| 233 | /* Only allocate from dynirq range */ | 237 | /* Only allocate from dynirq range */ |
| 234 | for_each_irq_nr(irq) | 238 | for (irq = 0; irq < nr_irqs; irq++) |
| 235 | if (irq_bindcount[irq] == 0) | 239 | if (irq_bindcount[irq] == 0) |
| 236 | break; | 240 | break; |
| 237 | 241 | ||
| @@ -579,7 +583,7 @@ void rebind_evtchn_irq(int evtchn, int irq) | |||
| 579 | spin_unlock(&irq_mapping_update_lock); | 583 | spin_unlock(&irq_mapping_update_lock); |
| 580 | 584 | ||
| 581 | /* new event channels are always bound to cpu 0 */ | 585 | /* new event channels are always bound to cpu 0 */ |
| 582 | irq_set_affinity(irq, cpumask_of_cpu(0)); | 586 | irq_set_affinity(irq, cpumask_of(0)); |
| 583 | 587 | ||
| 584 | /* Unmask the event channel. */ | 588 | /* Unmask the event channel. */ |
| 585 | enable_irq(irq); | 589 | enable_irq(irq); |
| @@ -608,9 +612,9 @@ static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | |||
| 608 | } | 612 | } |
| 609 | 613 | ||
| 610 | 614 | ||
| 611 | static void set_affinity_irq(unsigned irq, cpumask_t dest) | 615 | static void set_affinity_irq(unsigned irq, const struct cpumask *dest) |
| 612 | { | 616 | { |
| 613 | unsigned tcpu = first_cpu(dest); | 617 | unsigned tcpu = cpumask_first(dest); |
| 614 | rebind_irq_to_cpu(irq, tcpu); | 618 | rebind_irq_to_cpu(irq, tcpu); |
| 615 | } | 619 | } |
| 616 | 620 | ||
| @@ -792,7 +796,7 @@ void xen_irq_resume(void) | |||
| 792 | mask_evtchn(evtchn); | 796 | mask_evtchn(evtchn); |
| 793 | 797 | ||
| 794 | /* No IRQ <-> event-channel mappings. */ | 798 | /* No IRQ <-> event-channel mappings. */ |
| 795 | for_each_irq_nr(irq) | 799 | for (irq = 0; irq < nr_irqs; irq++) |
| 796 | irq_info[irq].evtchn = 0; /* zap event-channel binding */ | 800 | irq_info[irq].evtchn = 0; /* zap event-channel binding */ |
| 797 | 801 | ||
| 798 | for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++) | 802 | for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++) |
| @@ -824,7 +828,7 @@ void __init xen_init_IRQ(void) | |||
| 824 | mask_evtchn(i); | 828 | mask_evtchn(i); |
| 825 | 829 | ||
| 826 | /* Dynamic IRQ space is currently unbound. Zero the refcnts. */ | 830 | /* Dynamic IRQ space is currently unbound. Zero the refcnts. */ |
| 827 | for_each_irq_nr(i) | 831 | for (i = 0; i < nr_irqs; i++) |
| 828 | irq_bindcount[i] = 0; | 832 | irq_bindcount[i] = 0; |
| 829 | 833 | ||
| 830 | irq_ctx_init(smp_processor_id()); | 834 | irq_ctx_init(smp_processor_id()); |
