Skip to content

Commit

Permalink
drm/amdgpu: Change *use_mm to kthread_*use_mm
Browse files Browse the repository at this point in the history
The KCL already covers this, so make the change to handle newer kernels
that have the new definition utilized.

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
  • Loading branch information
Kent Russell committed Oct 21, 2020
1 parent 6cf15df commit f96a89c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ uint8_t amdgpu_amdkfd_get_xgmi_hops_count(struct kgd_dev *dst, struct kgd_dev *s
if ((mmptr) == current->mm) { \
valid = !get_user((dst), (wptr)); \
} else if (current->mm == NULL) { \
use_mm(mmptr); \
kthread_use_mm(mmptr); \
valid = !get_user((dst), (wptr)); \
unuse_mm(mmptr); \
kthread_unuse_mm(mmptr); \
} \
pagefault_enable(); \
} \
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ void copy_context_work_handler (struct work_struct *work)

p = workarea->p;
mm = get_task_mm(p->lead_thread);
use_mm(mm);
kthread_use_mm(mm);
list_for_each_entry(pdd, &p->per_device_data, per_device_list) {
struct device_queue_manager *dqm = pdd->dev->dqm;
struct qcm_process_device *qpd = &pdd->qpd;
Expand All @@ -2321,7 +2321,7 @@ void copy_context_work_handler (struct work_struct *work)

dqm_unlock(dqm);
}
unuse_mm(mm);
kthread_unuse_mm(mm);
mmput(mm);
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
if (!mm)
goto cleanup;

use_mm(mm);
kthread_use_mm(mm);

list_for_each_entry(sdma_q, &sdma_q_list.list, list) {
val = 0;
Expand All @@ -213,7 +213,7 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
}
}

unuse_mm(mm);
kthread_unuse_mm(mm);
mmput(mm);

/*
Expand Down

0 comments on commit f96a89c

Please sign in to comment.