.. | .. |
---|
1142 | 1142 | static void assign_ctxt_affinity(struct file *fp, struct qib_devdata *dd) |
---|
1143 | 1143 | { |
---|
1144 | 1144 | struct qib_filedata *fd = fp->private_data; |
---|
1145 | | - const unsigned int weight = cpumask_weight(¤t->cpus_allowed); |
---|
| 1145 | + const unsigned int weight = current->nr_cpus_allowed; |
---|
1146 | 1146 | const struct cpumask *local_mask = cpumask_of_pcibus(dd->pcidev->bus); |
---|
1147 | 1147 | int local_cpu; |
---|
1148 | 1148 | |
---|
.. | .. |
---|
1623 | 1623 | ret = find_free_ctxt(i_minor - 1, fp, uinfo); |
---|
1624 | 1624 | else { |
---|
1625 | 1625 | int unit; |
---|
1626 | | - const unsigned int cpu = cpumask_first(¤t->cpus_allowed); |
---|
1627 | | - const unsigned int weight = |
---|
1628 | | - cpumask_weight(¤t->cpus_allowed); |
---|
| 1626 | + const unsigned int cpu = cpumask_first(current->cpus_ptr); |
---|
| 1627 | + const unsigned int weight = current->nr_cpus_allowed; |
---|
1629 | 1628 | |
---|
1630 | 1629 | if (weight == 1 && !test_bit(cpu, qib_cpulist)) |
---|
1631 | 1630 | if (!find_hca(cpu, &unit) && unit >= 0) |
---|