summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
authorAmulya <Amurthyreddy@nvidia.com>2018-08-09 01:10:08 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-22 20:31:33 -0400
commit1c13da1d29c344cb60953eabeca56b601446c64a (patch)
tree145a1a133b2d85592e0ddd1a25b12fc48e879829 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h
parentf3c3e4dece89c5e2f77fbfaf3cacd877ba62406c (diff)
gpu: nvgpu: Changed enum gmmu_pgsz_gk20a into macros
Changed the enum gmmu_pgsz_gk20a into macros and changed all the instances of it. The enum gmmu_pgsz_gk20a was being used in for loops, where it was compared with an integer. This violates MISRA rule 10.4, which only allows arithmetic operations on operands of the same essential type category. Changing this enum into macro will fix this violation. JIRA NVGPU-993 Change-Id: I6f18b08bc7548093d99e8229378415bcdec749e3 Signed-off-by: Amulya <Amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1795593 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.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index b99603bb..0827d355 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -139,7 +139,7 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,
139 struct nvgpu_sgt *sgt, 139 struct nvgpu_sgt *sgt,
140 u64 buffer_offset, 140 u64 buffer_offset,
141 u64 size, 141 u64 size,
142 int pgsz_idx, 142 u32 pgsz_idx,
143 u8 kind_v, 143 u8 kind_v,
144 u32 ctag_offset, 144 u32 ctag_offset,
145 u32 flags, 145 u32 flags,
@@ -153,7 +153,7 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,
153void gk20a_locked_gmmu_unmap(struct vm_gk20a *vm, 153void gk20a_locked_gmmu_unmap(struct vm_gk20a *vm,
154 u64 vaddr, 154 u64 vaddr,
155 u64 size, 155 u64 size,
156 int pgsz_idx, 156 u32 pgsz_idx,
157 bool va_allocated, 157 bool va_allocated,
158 enum gk20a_mem_rw_flag rw_flag, 158 enum gk20a_mem_rw_flag rw_flag,
159 bool sparse, 159 bool sparse,
@@ -178,10 +178,8 @@ void gk20a_mm_init_pdb(struct gk20a *g, struct nvgpu_mem *mem,
178extern const struct gk20a_mmu_level gk20a_mm_levels_64k[]; 178extern const struct gk20a_mmu_level gk20a_mm_levels_64k[];
179extern const struct gk20a_mmu_level gk20a_mm_levels_128k[]; 179extern const struct gk20a_mmu_level gk20a_mm_levels_128k[];
180 180
181enum gmmu_pgsz_gk20a gk20a_get_pde_pgsz(struct gk20a *g, 181u32 gk20a_get_pde_pgsz(struct gk20a *g, const struct gk20a_mmu_level *l,
182 const struct gk20a_mmu_level *l, 182 struct nvgpu_gmmu_pd *pd, u32 pd_idx);
183 struct nvgpu_gmmu_pd *pd, u32 pd_idx); 183u32 gk20a_get_pte_pgsz(struct gk20a *g, const struct gk20a_mmu_level *l,
184enum gmmu_pgsz_gk20a gk20a_get_pte_pgsz(struct gk20a *g, 184 struct nvgpu_gmmu_pd *pd, u32 pd_idx);
185 const struct gk20a_mmu_level *l,
186 struct nvgpu_gmmu_pd *pd, u32 pd_idx);
187#endif /* MM_GK20A_H */ 185#endif /* MM_GK20A_H */