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>
This commit is contained in:
Konsta Holtta
2016-10-07 10:29:12 +03:00
committed by mobile promotions
parent 94efd53ed1
commit 6760e3c331

View File

@@ -417,7 +417,7 @@ struct mm_gk20a {
struct gk20a_allocator bootstrap_allocator; struct gk20a_allocator bootstrap_allocator;
u32 ce_ctx_id; u32 ce_ctx_id;
bool cleared; volatile bool cleared;
struct mutex first_clear_mutex; struct mutex first_clear_mutex;
struct list_head clear_list_head; struct list_head clear_list_head;