summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
diff options
context:
space:
mode:
authorScott Long <scottl@nvidia.com>2018-08-08 21:30:09 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-22 20:31:42 -0400
commit07f6739285140d7c5335ddcb8996450966bfc175 (patch)
treec7f1b3a73d519e44e4fe0d29516e6516740edb26 /drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
parent1c13da1d29c344cb60953eabeca56b601446c64a (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/ce2_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
index 1a102070..19a169da 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * GK20A graphics copy engine (gr host) 4 * GK20A graphics copy engine (gr host)
5 * 5 *
6 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"), 9 * copy of this software and associated documentation files (the "Software"),
@@ -30,7 +30,7 @@
30#include "tsg_gk20a.h" 30#include "tsg_gk20a.h"
31 31
32void gk20a_ce2_isr(struct gk20a *g, u32 inst_id, u32 pri_base); 32void gk20a_ce2_isr(struct gk20a *g, u32 inst_id, u32 pri_base);
33int gk20a_ce2_nonstall_isr(struct gk20a *g, u32 inst_id, u32 pri_base); 33u32 gk20a_ce2_nonstall_isr(struct gk20a *g, u32 inst_id, u32 pri_base);
34 34
35/* CE command utility macros */ 35/* CE command utility macros */
36#define NVGPU_CE_LOWER_ADDRESS_OFFSET_MASK 0xffffffff 36#define NVGPU_CE_LOWER_ADDRESS_OFFSET_MASK 0xffffffff