summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-10-07 03:29:12 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-14 11:12:08 -0400
commit6760e3c33125bfca0b9b37e802a80452159863a9 (patch)
treea9f8c6491edde4faf6a193b1ff0ebb3955430017 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h
parent94efd53ed1c8202b4b46af41ec8ab580774f4974 (diff)
gpu: nvgpu: mark vidmem.cleared volatile
The boolean flag mm_gk20a.vidmem.cleared is shared across threads, so mark it volatile to prevent compiler from wrongly optimizing accesses to it. Jira DNVGPU-84 Change-Id: I1fe66b26966685d3f74ed95ba53b198f810231b9 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1233016 (cherry picked from commit dc6c9db56ea8a5f55f28f97fdfc3c1ac60d8b195) Reviewed-on: http://git-master/r/1235317 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index fe10b046..75209063 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -417,7 +417,7 @@ struct mm_gk20a {
417 struct gk20a_allocator bootstrap_allocator; 417 struct gk20a_allocator bootstrap_allocator;
418 418
419 u32 ce_ctx_id; 419 u32 ce_ctx_id;
420 bool cleared; 420 volatile bool cleared;
421 struct mutex first_clear_mutex; 421 struct mutex first_clear_mutex;
422 422
423 struct list_head clear_list_head; 423 struct list_head clear_list_head;