summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-07-24 08:52:54 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-07-25 16:14:40 -0300
commit5fbcf5015db8e9f04a9da6d40322622fa229da54 (patch)
tree8b1566014d0258e8875b72bd82c432223c52528f /drivers/gpu
parent02712bc3250849c1cf99d626aea98f610e695f34 (diff)
nouveau: remove the block parameter to nouveau_range_fault
The parameter is always false, so remove it as well as the -EAGAIN handling that can only happen for the non-blocking case. Link: https://lore.kernel.org/r/20190724065258.16603-4-hch@lst.de Tested-by: Ralph Campbell <rcampbell@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_svm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
index 6c1b04de0db8..e3097492b4ad 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
@@ -485,8 +485,7 @@ nouveau_range_done(struct hmm_range *range)
}
static int
-nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range,
- bool block)
+nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range)
{
long ret;
@@ -504,13 +503,12 @@ nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range,
return -EAGAIN;
}
- ret = hmm_range_fault(range, block);
+ ret = hmm_range_fault(range, true);
if (ret <= 0) {
if (ret == -EBUSY || !ret) {
up_read(&range->vma->vm_mm->mmap_sem);
ret = -EBUSY;
- } else if (ret == -EAGAIN)
- ret = -EBUSY;
+ }
hmm_range_unregister(range);
return ret;
}
@@ -691,7 +689,7 @@ nouveau_svm_fault(struct nvif_notify *notify)
range.values = nouveau_svm_pfn_values;
range.pfn_shift = NVIF_VMM_PFNMAP_V0_ADDR_SHIFT;
again:
- ret = nouveau_range_fault(&svmm->mirror, &range, true);
+ ret = nouveau_range_fault(&svmm->mirror, &range);
if (ret == 0) {
mutex_lock(&svmm->mutex);
if (!nouveau_range_done(&range)) {