.. | .. |
---|
40 | 40 | #include <linux/highmem.h> |
---|
41 | 41 | #include <linux/io.h> |
---|
42 | 42 | #include <linux/jiffies.h> |
---|
43 | | -#include <asm/pgtable.h> |
---|
44 | 43 | #include <linux/delay.h> |
---|
45 | 44 | #include <linux/export.h> |
---|
46 | 45 | #include <linux/uio.h> |
---|
| 46 | +#include <linux/pgtable.h> |
---|
47 | 47 | |
---|
48 | 48 | #include <rdma/ib.h> |
---|
49 | 49 | |
---|
.. | .. |
---|
343 | 343 | |
---|
344 | 344 | /* virtual address of first page in transfer */ |
---|
345 | 345 | vaddr = ti->tidvaddr; |
---|
346 | | - if (!access_ok(VERIFY_WRITE, (void __user *) vaddr, |
---|
| 346 | + if (!access_ok((void __user *) vaddr, |
---|
347 | 347 | cnt * PAGE_SIZE)) { |
---|
348 | 348 | ret = -EFAULT; |
---|
349 | 349 | goto done; |
---|
.. | .. |
---|
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) |
---|
.. | .. |
---|
1790 | 1789 | |
---|
1791 | 1790 | static int qib_close(struct inode *in, struct file *fp) |
---|
1792 | 1791 | { |
---|
1793 | | - int ret = 0; |
---|
1794 | 1792 | struct qib_filedata *fd; |
---|
1795 | 1793 | struct qib_ctxtdata *rcd; |
---|
1796 | 1794 | struct qib_devdata *dd; |
---|
.. | .. |
---|
1874 | 1872 | |
---|
1875 | 1873 | bail: |
---|
1876 | 1874 | kfree(fd); |
---|
1877 | | - return ret; |
---|
| 1875 | + return 0; |
---|
1878 | 1876 | } |
---|
1879 | 1877 | |
---|
1880 | 1878 | static int qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo) |
---|