diff options
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_irq.c | 17 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 8 |
2 files changed, 12 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index 757035ea246f..3128a5090dbd 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -659,12 +659,12 @@ static inline int find_next_online_cpu(struct ehca_comp_pool *pool) | |||
659 | 659 | ||
660 | WARN_ON_ONCE(!in_interrupt()); | 660 | WARN_ON_ONCE(!in_interrupt()); |
661 | if (ehca_debug_level >= 3) | 661 | if (ehca_debug_level >= 3) |
662 | ehca_dmp(&cpu_online_map, sizeof(cpumask_t), ""); | 662 | ehca_dmp(cpu_online_mask, cpumask_size(), ""); |
663 | 663 | ||
664 | spin_lock_irqsave(&pool->last_cpu_lock, flags); | 664 | spin_lock_irqsave(&pool->last_cpu_lock, flags); |
665 | cpu = next_cpu_nr(pool->last_cpu, cpu_online_map); | 665 | cpu = cpumask_next(pool->last_cpu, cpu_online_mask); |
666 | if (cpu >= nr_cpu_ids) | 666 | if (cpu >= nr_cpu_ids) |
667 | cpu = first_cpu(cpu_online_map); | 667 | cpu = cpumask_first(cpu_online_mask); |
668 | pool->last_cpu = cpu; | 668 | pool->last_cpu = cpu; |
669 | spin_unlock_irqrestore(&pool->last_cpu_lock, flags); | 669 | spin_unlock_irqrestore(&pool->last_cpu_lock, flags); |
670 | 670 | ||
@@ -855,7 +855,7 @@ static int __cpuinit comp_pool_callback(struct notifier_block *nfb, | |||
855 | case CPU_UP_CANCELED_FROZEN: | 855 | case CPU_UP_CANCELED_FROZEN: |
856 | ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu); | 856 | ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu); |
857 | cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); | 857 | cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); |
858 | kthread_bind(cct->task, any_online_cpu(cpu_online_map)); | 858 | kthread_bind(cct->task, cpumask_any(cpu_online_mask)); |
859 | destroy_comp_task(pool, cpu); | 859 | destroy_comp_task(pool, cpu); |
860 | break; | 860 | break; |
861 | case CPU_ONLINE: | 861 | case CPU_ONLINE: |
@@ -902,7 +902,7 @@ int ehca_create_comp_pool(void) | |||
902 | return -ENOMEM; | 902 | return -ENOMEM; |
903 | 903 | ||
904 | spin_lock_init(&pool->last_cpu_lock); | 904 | spin_lock_init(&pool->last_cpu_lock); |
905 | pool->last_cpu = any_online_cpu(cpu_online_map); | 905 | pool->last_cpu = cpumask_any(cpu_online_mask); |
906 | 906 | ||
907 | pool->cpu_comp_tasks = alloc_percpu(struct ehca_cpu_comp_task); | 907 | pool->cpu_comp_tasks = alloc_percpu(struct ehca_cpu_comp_task); |
908 | if (pool->cpu_comp_tasks == NULL) { | 908 | if (pool->cpu_comp_tasks == NULL) { |
@@ -934,10 +934,9 @@ void ehca_destroy_comp_pool(void) | |||
934 | 934 | ||
935 | unregister_hotcpu_notifier(&comp_pool_callback_nb); | 935 | unregister_hotcpu_notifier(&comp_pool_callback_nb); |
936 | 936 | ||
937 | for (i = 0; i < NR_CPUS; i++) { | 937 | for_each_online_cpu(i) |
938 | if (cpu_online(i)) | 938 | destroy_comp_task(pool, i); |
939 | destroy_comp_task(pool, i); | 939 | |
940 | } | ||
941 | free_percpu(pool->cpu_comp_tasks); | 940 | free_percpu(pool->cpu_comp_tasks); |
942 | kfree(pool); | 941 | kfree(pool); |
943 | } | 942 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 239d4e8068ac..23173982b32c 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -1679,7 +1679,7 @@ static int find_best_unit(struct file *fp, | |||
1679 | * InfiniPath chip to that processor (we assume reasonable connectivity, | 1679 | * InfiniPath chip to that processor (we assume reasonable connectivity, |
1680 | * for now). This code assumes that if affinity has been set | 1680 | * for now). This code assumes that if affinity has been set |
1681 | * before this point, that at most one cpu is set; for now this | 1681 | * before this point, that at most one cpu is set; for now this |
1682 | * is reasonable. I check for both cpus_empty() and cpus_full(), | 1682 | * is reasonable. I check for both cpumask_empty() and cpumask_full(), |
1683 | * in case some kernel variant sets none of the bits when no | 1683 | * in case some kernel variant sets none of the bits when no |
1684 | * affinity is set. 2.6.11 and 12 kernels have all present | 1684 | * affinity is set. 2.6.11 and 12 kernels have all present |
1685 | * cpus set. Some day we'll have to fix it up further to handle | 1685 | * cpus set. Some day we'll have to fix it up further to handle |
@@ -1688,11 +1688,11 @@ static int find_best_unit(struct file *fp, | |||
1688 | * information. There may be some issues with dual core numbering | 1688 | * information. There may be some issues with dual core numbering |
1689 | * as well. This needs more work prior to release. | 1689 | * as well. This needs more work prior to release. |
1690 | */ | 1690 | */ |
1691 | if (!cpus_empty(current->cpus_allowed) && | 1691 | if (!cpumask_empty(¤t->cpus_allowed) && |
1692 | !cpus_full(current->cpus_allowed)) { | 1692 | !cpumask_full(¤t->cpus_allowed)) { |
1693 | int ncpus = num_online_cpus(), curcpu = -1, nset = 0; | 1693 | int ncpus = num_online_cpus(), curcpu = -1, nset = 0; |
1694 | for (i = 0; i < ncpus; i++) | 1694 | for (i = 0; i < ncpus; i++) |
1695 | if (cpu_isset(i, current->cpus_allowed)) { | 1695 | if (cpumask_test_cpu(i, ¤t->cpus_allowed)) { |
1696 | ipath_cdbg(PROC, "%s[%u] affinity set for " | 1696 | ipath_cdbg(PROC, "%s[%u] affinity set for " |
1697 | "cpu %d/%d\n", current->comm, | 1697 | "cpu %d/%d\n", current->comm, |
1698 | current->pid, i, ncpus); | 1698 | current->pid, i, ncpus); |