Commit 7e3fb209 authored by Alex Sierra's avatar Alex Sierra Committed by Alex Deucher

amd/amdkfd: remove svms declaration to avoid werror

svm_range_list svms declaration removed to avoid werror when
CONFIG_HSA_AMD_SVM is not enabled.
Signed-off-by: default avatarAlex Sierra <alex.sierra@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9c152f54
...@@ -1251,7 +1251,6 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep, ...@@ -1251,7 +1251,6 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,
struct kfd_process_device *pdd; struct kfd_process_device *pdd;
void *mem; void *mem;
struct kfd_dev *dev; struct kfd_dev *dev;
struct svm_range_list *svms = &p->svms;
int idr_handle; int idr_handle;
long err; long err;
uint64_t offset = args->mmap_offset; uint64_t offset = args->mmap_offset;
...@@ -1264,18 +1263,18 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep, ...@@ -1264,18 +1263,18 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,
/* Flush pending deferred work to avoid racing with deferred actions /* Flush pending deferred work to avoid racing with deferred actions
* from previous memory map changes (e.g. munmap). * from previous memory map changes (e.g. munmap).
*/ */
svm_range_list_lock_and_flush_work(svms, current->mm); svm_range_list_lock_and_flush_work(&p->svms, current->mm);
mutex_lock(&svms->lock); mutex_lock(&p->svms.lock);
mmap_write_unlock(current->mm); mmap_write_unlock(current->mm);
if (interval_tree_iter_first(&svms->objects, if (interval_tree_iter_first(&p->svms.objects,
args->va_addr >> PAGE_SHIFT, args->va_addr >> PAGE_SHIFT,
(args->va_addr + args->size - 1) >> PAGE_SHIFT)) { (args->va_addr + args->size - 1) >> PAGE_SHIFT)) {
pr_err("Address: 0x%llx already allocated by SVM\n", pr_err("Address: 0x%llx already allocated by SVM\n",
args->va_addr); args->va_addr);
mutex_unlock(&svms->lock); mutex_unlock(&p->svms.lock);
return -EADDRINUSE; return -EADDRINUSE;
} }
mutex_unlock(&svms->lock); mutex_unlock(&p->svms.lock);
#endif #endif
dev = kfd_device_by_id(args->gpu_id); dev = kfd_device_by_id(args->gpu_id);
if (!dev) if (!dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment