diff options
author | Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> | 2023-08-04 11:16:41 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-08-30 15:51:17 -0400 |
commit | bf227a4f0558320513b86c279996021480f9e750 (patch) | |
tree | daf32c9e6e4e6143165ea41b1263c096d31b1b0d /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | 4d5dc6260c2d00d603ae9c4ab452b6b4587f0d9f (diff) |
drm/amdgpu: Use READ_ONCE() when reading the values in 'sdma_v4_4_2_ring_get_rptr'
Use READ_ONCE() instead of declaring the pointer volatile. To prevent
the compiler from refetching or reordering the read, so that the read
value is always consistent.
Link: https://lwn.net/Articles/624126/
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Guchun Chen <guchun.chen@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: Le Ma <le.ma@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions