aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/ehca/ehca_irq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c
index ce1ab0571be3..43180b952c1f 100644
--- a/drivers/infiniband/hw/ehca/ehca_irq.c
+++ b/drivers/infiniband/hw/ehca/ehca_irq.c
@@ -641,8 +641,8 @@ static inline int find_next_online_cpu(struct ehca_comp_pool *pool)
641 ehca_dmp(&cpu_online_map, sizeof(cpumask_t), ""); 641 ehca_dmp(&cpu_online_map, sizeof(cpumask_t), "");
642 642
643 spin_lock_irqsave(&pool->last_cpu_lock, flags); 643 spin_lock_irqsave(&pool->last_cpu_lock, flags);
644 cpu = next_cpu(pool->last_cpu, cpu_online_map); 644 cpu = next_cpu_nr(pool->last_cpu, cpu_online_map);
645 if (cpu == NR_CPUS) 645 if (cpu >= nr_cpu_ids)
646 cpu = first_cpu(cpu_online_map); 646 cpu = first_cpu(cpu_online_map);
647 pool->last_cpu = cpu; 647 pool->last_cpu = cpu;
648 spin_unlock_irqrestore(&pool->last_cpu_lock, flags); 648 spin_unlock_irqrestore(&pool->last_cpu_lock, flags);