summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-07-11 13:00:40 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-07-13 22:46:21 +0300
commita5ccfe5c20740f2fbf00291490cdf8d2373ec255 (patch)
tree66b6a41a586ebba1e8c04a71dfbe3058c42b9581 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentddc21af4d0f37f42b33c54cb69b215997fe5b082 (diff)
downloadlinux-a5ccfe5c20740f2fbf00291490cdf8d2373ec255.tar.xz
drm/amdgpu: Make pin_size values atomic
Concurrent execution of the non-atomic arithmetic could result in completely bogus values. v2: * Rebased on v2 of the previous patch Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/106872 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 51b16de008bb..53435da158c2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1589,9 +1589,9 @@ struct amdgpu_device {
DECLARE_HASHTABLE(mn_hash, 7);
/* tracking pinned memory */
- u64 vram_pin_size;
- u64 visible_pin_size;
- u64 gart_pin_size;
+ atomic64_t vram_pin_size;
+ atomic64_t visible_pin_size;
+ atomic64_t gart_pin_size;
/* amdkfd interface */
struct kfd_dev *kfd;