diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 33696ee55349cff09338d766e84ada7df837431c..407882b233c7952c99ed3128fbd9c7aa2adcab58 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1084,6 +1084,8 @@ int amdgpu_vm_bo_unmap(struct amdgpu_device *adev, struct amdgpu_bo_va_mapping *mapping; struct amdgpu_vm *vm = bo_va->vm; + saddr /= AMDGPU_GPU_PAGE_SIZE; + list_for_each_entry(mapping, &bo_va->mappings, list) { if (mapping->it.start == saddr) break;