diff options
author | Peng Hao | 2019-07-02 11:38:09 -0600 |
---|---|---|
committer | Alex Williamson | 2019-07-02 11:44:12 -0600 |
commit | e66e02c4d96d335eedabd9678416f2949d68ebc8 (patch) | |
tree | bd6c15690b6ac4a8f042711704dd7bff435e0e48 /drivers/vfio | |
parent | 4b2dbd566c7b91740e32b30a68a7f2b38e3495b9 (diff) |
vfio: vfio_pci_nvlink2: use a vma helper function
Use a vma helper function to simply code.
Signed-off-by: Peng Hao <richard.peng@oppo.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r-- | drivers/vfio/pci/vfio_pci_nvlink2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci/vfio_pci_nvlink2.c index 50fe3c4f7feb..f2983f0f84be 100644 --- a/drivers/vfio/pci/vfio_pci_nvlink2.c +++ b/drivers/vfio/pci/vfio_pci_nvlink2.c @@ -161,8 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev, atomic_inc(&data->mm->mm_count); ret = (int) mm_iommu_newdev(data->mm, data->useraddr, - (vma->vm_end - vma->vm_start) >> PAGE_SHIFT, - data->gpu_hpa, &data->mem); + vma_pages(vma), data->gpu_hpa, &data->mem); trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr, vma->vm_end - vma->vm_start, ret); |