summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-08-02 17:53:10 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-04 13:25:49 -0400
commit2e07e0633081a838f139fac0565366383f7302c4 (patch)
tree53c6df3290a410561850028960604e5b9a77f568 /drivers/gpu/nvgpu/common/pmu/pmu_pg.c
parenta0a3a6323a0e4323d9dedac14b47239535b1cb8b (diff)
gpu: nvgpu: Remove unnecessary use of ACCESS_ONCE()
ACCESS_ONCE() is used for making sure that in a given place of code access a variable exactly once. It prevents compiler rearranging the read from happening earlier. Remove its use from cases where rearranging of the read does not create problems. Change-Id: I340f375e8fecc31f3a3fab543256069cb4c682dc Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1531649 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pmu/pmu_pg.c')
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_pg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
index 3cdeedcc..ca74f243 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
@@ -206,7 +206,7 @@ int nvgpu_pmu_enable_elpg(struct gk20a *g)
206 pg_engine_id++) { 206 pg_engine_id++) {
207 207
208 if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_MS && 208 if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_MS &&
209 ACCESS_ONCE(pmu->mscg_stat) == PMU_MSCG_DISABLED) 209 pmu->mscg_stat == PMU_MSCG_DISABLED)
210 continue; 210 continue;
211 211
212 if (BIT(pg_engine_id) & pg_engine_id_list) 212 if (BIT(pg_engine_id) & pg_engine_id_list)
@@ -281,7 +281,7 @@ int nvgpu_pmu_disable_elpg(struct gk20a *g)
281 pg_engine_id++) { 281 pg_engine_id++) {
282 282
283 if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_MS && 283 if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_MS &&
284 ACCESS_ONCE(pmu->mscg_stat) == PMU_MSCG_DISABLED) 284 pmu->mscg_stat == PMU_MSCG_DISABLED)
285 continue; 285 continue;
286 286
287 if (BIT(pg_engine_id) & pg_engine_id_list) { 287 if (BIT(pg_engine_id) & pg_engine_id_list) {