drm/amdkfd: remove extra use of volatile
Subsystems (3)
PATCH 1/1 drm/amdkfd: remove extra use of volatile
as the adding of mb() should be sufficient in function unmap_queues_cpsch, remove the add of volatile type as recommended
Signed-off-by Victor Zhao <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1 -1
@@ -2048,7 +2048,7 @@ int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm, {unsigned long end_jiffies =msecs_to_jiffies (timeout_ms) + jiffies;struct device *dev = dqm->dev->adev->dev; -volatile uint64_t *fence_addr = dqm->fence_addr; +uint64_t *fence_addr = dqm->fence_addr;while (*fence_addr != fence_value) {/* Fatal err detected, this response won't come */
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1 -1
@@ -260,7 +260,7 @@ struct device_queue_manager {uint16_t vmid_pasid[VMID_NUM ];uint64_t pipelines_addr;uint64_t fence_gpu_addr; -volatile uint64_t *fence_addr; +uint64_t *fence_addr;struct kfd_mem_obj *fence_mem;bool active_runlist;int sched_policy;
Signature · 1 line
2.34.1
Quoted 5 lines · Victor Zhao
as the adding of
mb()should be sufficient in functionunmap_queues_cpsch, remove the add of volatile type as recommendedSigned-off-by Victor Zhao <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 34 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1
-1@@ -2048,7 +2048,7 @@ int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm, {unsigned long end_jiffies =msecs_to_jiffies (timeout_ms) + jiffies;struct device *dev = dqm->dev->adev->dev; -volatile uint64_t *fence_addr = dqm->fence_addr; +uint64_t *fence_addr = dqm->fence_addr;while (*fence_addr != fence_value) {/* Fatal err detected, this response won't come */ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1
-2@@ -260,7 +260,7 @@ struct device_queue_manager {uint16_t vmid_pasid[VMID_NUM ];uint64_t pipelines_addr;uint64_t fence_gpu_addr; -volatile uint64_t *fence_addr; +uint64_t *fence_addr;struct kfd_mem_obj *fence_mem;bool active_runlist;int sched_policy; --2.34.1
Am 22.10.24 um 15:53 schrieb Victor Zhao:
Quoted 4 lines
as the adding of
mb()should be sufficient in functionunmap_queues_cpsch, remove the add of volatile type as recommendedSigned-off-by Victor Zhao <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 31 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1
-1@@ -2048,7 +2048,7 @@ int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm, {unsigned long end_jiffies =msecs_to_jiffies (timeout_ms) + jiffies;struct device *dev = dqm->dev->adev->dev; -volatile uint64_t *fence_addr = dqm->fence_addr; +uint64_t *fence_addr = dqm->fence_addr;while (*fence_addr != fence_value) {/* Fatal err detected, this response won't come */ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1
-1@@ -260,7 +260,7 @@ struct device_queue_manager {uint16_t vmid_pasid[VMID_NUM ];uint64_t pipelines_addr;uint64_t fence_gpu_addr; -volatile uint64_t *fence_addr; +uint64_t *fence_addr;struct kfd_mem_obj *fence_mem;bool active_runlist;int sched_policy;