diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2017-08-03 06:04:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-17 17:26:47 -0400 |
commit | 98186ec2c2127c2af65a34f9e697e04f518a79ab (patch) | |
tree | 08ad87f3bf8c739e96b36f01728a8f7a30749a0e /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 49dc335cfe588179cbb42d8bab53bc76ba88b28f (diff) |
gpu: nvgpu: Add wrapper over atomic_t and atomic64_t
- added wrapper structs nvgpu_atomic_t and nvgpu_atomic64_t over
atomic_t and atomic64_t
- added nvgpu_atomic_* and nvgpu_atomic64_* APIs to access the above
wrappers.
JIRA NVGPU-121
Change-Id: I61667bb0a84c2fc475365abb79bffb42b8b4786a
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1533044
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 4878fdd6..47fd3aef 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -48,6 +48,7 @@ struct nvgpu_cpu_time_correlation_sample; | |||
48 | #include <nvgpu/kref.h> | 48 | #include <nvgpu/kref.h> |
49 | #include <nvgpu/falcon.h> | 49 | #include <nvgpu/falcon.h> |
50 | #include <nvgpu/pmu.h> | 50 | #include <nvgpu/pmu.h> |
51 | #include <nvgpu/atomic.h> | ||
51 | 52 | ||
52 | #include "clk_gk20a.h" | 53 | #include "clk_gk20a.h" |
53 | #include "ce2_gk20a.h" | 54 | #include "ce2_gk20a.h" |
@@ -1038,7 +1039,7 @@ struct gk20a { | |||
1038 | */ | 1039 | */ |
1039 | unsigned long *enabled_flags; | 1040 | unsigned long *enabled_flags; |
1040 | 1041 | ||
1041 | atomic_t usage_count; | 1042 | nvgpu_atomic_t usage_count; |
1042 | 1043 | ||
1043 | struct kref refcount; | 1044 | struct kref refcount; |
1044 | 1045 | ||
@@ -1205,7 +1206,7 @@ struct gk20a { | |||
1205 | 1206 | ||
1206 | struct gk20a_channel_worker { | 1207 | struct gk20a_channel_worker { |
1207 | struct nvgpu_thread poll_task; | 1208 | struct nvgpu_thread poll_task; |
1208 | atomic_t put; | 1209 | nvgpu_atomic_t put; |
1209 | struct nvgpu_cond wq; | 1210 | struct nvgpu_cond wq; |
1210 | struct nvgpu_list_node items; | 1211 | struct nvgpu_list_node items; |
1211 | struct nvgpu_spinlock items_lock; | 1212 | struct nvgpu_spinlock items_lock; |