diff options
author | Scott Long <scottl@nvidia.com> | 2018-08-08 21:30:09 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-22 20:31:42 -0400 |
commit | 07f6739285140d7c5335ddcb8996450966bfc175 (patch) | |
tree | c7f1b3a73d519e44e4fe0d29516e6516740edb26 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |
parent | 1c13da1d29c344cb60953eabeca56b601446c64a (diff) |
gpu: nvgpu: switch gk20a nonstall ops to #defines
Fix MISRA rule 10.1 violations involving gk20a_nonstall_ops
enums by replacing them with with corresponding #defines.
Because these values can be used in expressions that require
unsigned values (e.g. bitwise OR) we cannot use enums.
The g->ce2.isr_nonstall() function was previously returning an
int that was a combination of gk20a_nonstall_ops enum bits which
led to the violations.
JIRA NVGPU-650
Change-Id: I6210aacec8829b3c8d339c5fe3db2f3069c67406
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1796242
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 120950c1..77030c94 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | struct gk20a_debug_output; | 32 | struct gk20a_debug_output; |
33 | struct mmu_fault_info; | 33 | struct mmu_fault_info; |
34 | enum gk20a_nonstall_ops; | ||
35 | 34 | ||
36 | enum { | 35 | enum { |
37 | NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW = 0, | 36 | NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW = 0, |
@@ -229,7 +228,7 @@ int gk20a_init_fifo_support(struct gk20a *g); | |||
229 | int gk20a_init_fifo_setup_hw(struct gk20a *g); | 228 | int gk20a_init_fifo_setup_hw(struct gk20a *g); |
230 | 229 | ||
231 | void gk20a_fifo_isr(struct gk20a *g); | 230 | void gk20a_fifo_isr(struct gk20a *g); |
232 | enum gk20a_nonstall_ops gk20a_fifo_nonstall_isr(struct gk20a *g); | 231 | u32 gk20a_fifo_nonstall_isr(struct gk20a *g); |
233 | 232 | ||
234 | int gk20a_fifo_preempt_channel(struct gk20a *g, u32 chid); | 233 | int gk20a_fifo_preempt_channel(struct gk20a *g, u32 chid); |
235 | int gk20a_fifo_preempt_tsg(struct gk20a *g, u32 tsgid); | 234 | int gk20a_fifo_preempt_tsg(struct gk20a *g, u32 tsgid); |